Spotlights (Lära)

TABLE OF CONTENTS

Spotlights: catalogspotlight/get
Spotlights: catalogspotlight/getlist
Spotlights: catalogspotlight/create
Spotlights: catalogspotlight/edit
Spotlights: catalogspotlight/delete
Spotlights: catalogspotlight/setworkspaceinstances
Spotlights: catalogspotlight/getworkspaceinstances
Spotlights: catalogspotlight/setcohorts
Spotlights: catalogspotlight/getcohorts
Spotlight error code descriptions

Spotlights

"Spotlights" are used to highlight course sessions or program cohorts in the catalogues, by means of a coloured badge bearing a title and a label. A spotlight in the API is named "catalogspotlight".

Spotlights: catalogspotlight/get

https://www.domaine.com/lmsapi/catalogspotlight/get

Returns an object representing a spotlight in your environment.
API call address : https://.../lmsapi/catalogspotlight/get

Request

Example of request call content for information on a spotlight:

{  
   "id" : "Eiakb2wlFfzKdJgH23kygQ%3d%3d"
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the spotlight.
(String type)

Response

Example of response call content for information on a spotlight:

{
    "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d",
    "title": {
        "texts": [
            {
                "text": "API_CS_TITLE",
                "languageId": 1
            }
        ],
        "ErrorID": 0
    },
    "label": {
        "texts": [
            {
                "text": "API_LABEL",
                "languageId": 1
            }
        ],
        "ErrorID": 0
    },
    "color": "F40000"
}

Field descriptions

NameComments/description
idUnique identifier of the spotlight.
(String type)
titleTitle of the spotlight, as multilingual texts (texts).
  • text: the title as seen by users in the system. (String type, between 3 and 150 characters)
  • languageId: display language.
  • 1 = French (Canada)
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish
(Number type)
labelLabel of the spotlight, as multilingual texts (texts).
  • text: the label as seen by users in the system. (String type, between 3 and 12 characters)
  • languageId: display language.
  • 1 = French (Canada)
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish
(Number type)
colorColour of the spotlight badge.
(String type)

Spotlights: catalogspotlight/getlist

https://www.domaine.com/lmsapi/catalogspotlight/getlist

Returns the list of all the spotlights in your environment.
API call address : https://.../lmsapi/catalogspotlight/getlist

Request

Example of request call content for the list of spotlights:

Field descriptions

Name
Required
Comments/description
  The method does not require any parameter.

Response

Example of response call content for the list of spotlights:

[
    {
        "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d",
        "title": {
            "texts": [
                {
                    "text": "API_CS_TITLE",
                    "languageId": 1
                },
                {
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "label": {
            "texts": [
                {
                    "text": "API_LABEL",
                    "languageId": 1
                },
                {
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "color": "F40000"
    },
    {
        "id": "k0gEJ48oDezizeIqAsmhmQ%3d%3d",
        "title": {
            "texts": [
                {
                    "text": "CatalogSpotlightTitle",
                    "languageId": 1
                },
                {
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "label": {
            "texts": [
                {
                    "text": "CSLabel",
                    "languageId": 1
                },
                {
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "color": "FFFFFF"
    }
]

Field descriptions

Each element of the list contains the same fields as those returned by catalogspotlight/get:

NameComments/description
idUnique identifier of the spotlight.
(String type)
titleTitle of the spotlight, as multilingual texts (texts).
  • text: the title as seen by users in the system. (String type, between 3 and 150 characters)
  • languageId: display language.
  • 1 = French (Canada)
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish
(Number type)
labelLabel of the spotlight, as multilingual texts (texts).
  • text: the label as seen by users in the system. (String type, between 3 and 12 characters)
  • languageId: display language.
  • 1 = French (Canada)
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish
(Number type)
colorColour of the spotlight badge.
(String type)

Spotlights: catalogspotlight/create

https://www.domaine.com/lmsapi/catalogspotlight/create

Creates a spotlight in your environment.
API call address : https://.../lmsapi/catalogspotlight/create

Request

Example of request call content to create a spotlight:

{
    "title": {
        "texts": [{
                "text": "CatalogSpotlightTitle",
                "languageId": 1
            }
        ]
    },
    "label": {
        "texts": [{
                "text": "CSLabel",
                "languageId": 1
            }
        ]
    },
    "color": "FFFFFF"
}

Field descriptions

Name
Required
Comments/description
title
X
Title of the spotlight, as multilingual texts (texts).
  • text: the title as seen by users in the system. (String type, between 3 and 150 characters)
  • languageId: display language.
  • 1 = French (Canada)
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish
(Number type)
label
X
Label of the spotlight, as multilingual texts (texts).
  • text: the label as seen by users in the system. (String type, between 3 and 12 characters)
  • languageId: display language.
  • 1 = French (Canada)
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish
(Number type)
color Colour of the spotlight badge.
(String type)

Response

Example of response call content when creating a spotlight:

{
    "id": "k0gEJ48oDezizeIqAsmhmQ%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the created spotlight.
(String type)



Spotlights: catalogspotlight/edit

https://www.domaine.com/lmsapi/catalogspotlight/edit

Modifies an existing spotlight.
API call address : https://.../lmsapi/catalogspotlight/edit

Request

Example of request call content to modify a spotlight:

{
    "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d",
    "title": {
        "texts": [{
                "text": "titleCS",
                "languageId": 1
            }
        ]
    },
    "label": {
        "texts": [{
                "text": "labelCS",
                "languageId": 1
            }
        ]
    },
    "color": "123456"
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the spotlight.
(String type)
title Title of the spotlight, as multilingual texts (texts).
  • text: the title as seen by users in the system. (String type, between 3 and 150 characters)
  • languageId: display language.
  • 1 = French (Canada)
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish
(Number type)
label Label of the spotlight, as multilingual texts (texts).
  • text: the label as seen by users in the system. (String type, between 3 and 12 characters)
  • languageId: display language.
  • 1 = French (Canada)
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish
(Number type)
color Colour of the spotlight badge.
(String type)

Response

Example of response call content when modifying a spotlight:

{
    "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the modified spotlight.
(String type)


Spotlights: catalogspotlight/delete

https://www.domaine.com/lmsapi/catalogspotlight/delete

Deletes an existing spotlight.
API call address : https://.../lmsapi/catalogspotlight/delete

Request

Example of request call content to delete a spotlight:

{   
 "id": "j9XoGU3mn7f5K7vuvsg9LQ%3d%3d"   
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the spotlight.
(String type)

Response

Example of response call content when deleting a spotlight:

{   
 "id": "j9XoGU3mn7f5K7vuvsg9LQ%3d%3d"   
}

Field descriptions

NameComments/description
idUnique identifier of the deleted spotlight.
(String type)


Spotlights: catalogspotlight/setworkspaceinstances

https://www.domaine.com/lmsapi/catalogspotlight/setworkspaceinstances

Associates course sessions with a spotlight.
API call address : https://.../lmsapi/catalogspotlight/setworkspaceinstances

Request

Example of request call content to associate sessions with a spotlight:

{  
        "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d",
        "spotlightAssociations": 
        [
            {
                "id" : "jt9UU9fr%2fppeVdmulnSbPQ%3d%3d",      
                "activeFromDate": "2010-01-01T00:00:00",
                "activeUpToDate": "2031-01-01T00:00:00"
            },
            {
                "id" : "1odV3GTk6pHhgLNDBK1bnQ%3d%3d"
            }                    
        ]     
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the spotlight.
(String type)
spotlightAssociations
X
Contains the list of sessions that will be associated with the spotlight.
  • id: unique identifier of the session. (String type)
  • activeFromDate: start date of the association. (Date type YYYY-MM-DDTHH:MM:SSZ)
  • activeUpToDate: end date of the association. (Date type YYYY-MM-DDTHH:MM:SSZ)

Response

Example of response call content when associating sessions with a spotlight:

{
    "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the spotlight.
(String type)

Spotlights: catalogspotlight/getworkspaceinstances

https://www.domaine.com/lmsapi/catalogspotlight/getworkspaceinstances

Returns the list of course sessions associated with a spotlight.
API call address : https://.../lmsapi/catalogspotlight/getworkspaceinstances

Request

Example of request call content for the list of sessions associated with a spotlight:

{  
    "id" : "Eiakb2wlFfzKdJgH23kygQ%3d%3d"    
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the spotlight.
(String type)

Response

Example of response call content for the list of sessions associated with a spotlight:

{
    "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d",
    "spotlightAssociations": [
        {
            "id": "jt9UU9fr%2fppeVdmulnSbPQ%3d%3d",
            "activeFromDate": "2010-01-01T00:00:00",
            "activeUpToDate": "2031-01-01T00:00:00"
        },
        {
            "id": "1odV3GTk6pHhgLNDBK1bnQ%3d%3d",
            "activeFromDate": "0001-01-01T00:00:00",
            "activeUpToDate": "0001-01-01T00:00:00"
        },
        {
            "id": "C81F0WSGq7p505Q97UjFlQ%3d%3d",
            "activeFromDate": "0001-01-01T00:00:00",
            "activeUpToDate": "0001-01-01T00:00:00"
        }
    ]
}

Field descriptions

NameComments/description
idUnique identifier of the spotlight.
(String type)
spotlightAssociationsContains the list of sessions that will be associated with the spotlight.
  • id: unique identifier of the session. (String type)
  • activeFromDate: start date of the association. (Date type YYYY-MM-DDTHH:MM:SSZ)
  • activeUpToDate: end date of the association. (Date type YYYY-MM-DDTHH:MM:SSZ)

Spotlights: catalogspotlight/setcohorts

https://www.domaine.com/lmsapi/catalogspotlight/setcohorts

Associates program cohorts with a spotlight.
API call address : https://.../lmsapi/catalogspotlight/setcohorts

Request

Example of request call content to associate cohorts with a spotlight:

{  
        "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d",
        "spotlightAssociations": 
        [
            {
                "id" : "eWAFhEFBmzdeDcziVz93Ag%3d%3d",
                "activeFromDate": "2010-01-01T00:00:00",
                "activeUpToDate": "2021-01-01T00:00:00"
            }                 
        ]     
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the spotlight.
(String type)
spotlightAssociations
X
Contains the list of cohorts that will be associated with the spotlight.
  • id: unique identifier of the cohort. (String type)
  • activeFromDate: start date of the association. (Date type YYYY-MM-DDTHH:MM:SSZ)
  • activeUpToDate: end date of the association. (Date type YYYY-MM-DDTHH:MM:SSZ)

Response

Example of response call content when associating cohorts with a spotlight:

{
    "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the spotlight.
(String type)

Spotlights: catalogspotlight/getcohorts

https://www.domaine.com/lmsapi/catalogspotlight/getcohorts

Returns the list of program cohorts associated with a spotlight.
API call address : https://.../lmsapi/catalogspotlight/getcohorts

Request

Example of request call content for the list of cohorts associated with a spotlight:

{  
    "id" : "Eiakb2wlFfzKdJgH23kygQ%3d%3d"    
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the spotlight.
(String type)

Response

Example of response call content for the list of cohorts associated with a spotlight:

{
    "id": "Eiakb2wlFfzKdJgH23kygQ%3d%3d",
    "spotlightAssociations": [
        {
            "id": "eWAFhEFBmzdeDcziVz93Ag%3d%3d",
            "activeFromDate": "2010-01-01T00:00:00",
            "activeUpToDate": "2021-01-01T00:00:00"
        }
    ]
}

Field descriptions

NameComments/description
idUnique identifier of the spotlight.
(String type)
spotlightAssociationsContains the list of cohorts that will be associated with the spotlight.
  • id: unique identifier of the cohort. (String type)
  • activeFromDate: start date of the association. (Date type YYYY-MM-DDTHH:MM:SSZ)
  • activeUpToDate: end date of the association. (Date type YYYY-MM-DDTHH:MM:SSZ)

Spotlight error code descriptions

NumberMessageComment/description
2201RequiredIDYou must provide an identifier for the catalogspotlight
2202InvalidIDYou must provide a valid identifier for the catalogspotlight
2203RequiredTitleYou must provide a title
2204InvalidTitleLengthThe length of the title provided is invalid
2205RequiredLabelYou must provide a label
2206InvalidLabelLengthThe length of the label provided is invalid
2207RequiredSpotlightAssociationIDYou must provide an identifier for the association object
2208InvalidSpotlightAssociationIDThe identifier provided for the association object is invalid
2209InvalidSpotlightAssociationDataThe data contained in the association object is invalid
2210InvalidActiveFromDate
The association start date is not valid
2211InvalidActiveUpToDateThe association end date is not valid
2212InvalidLanguageIDThe language identifier is not valid
2213UndefinedLanguageIDThe language identifier does not match any language
2214DeleteHasFailedThe deletion failed
2215AssociationHasFailedThe association failed




Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.