> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.tangerine365.com/llms.txt.
> For full documentation content, see https://docs.tangerine365.com/llms-full.txt.

# Course Learning Object

POST https://localhost:8090//api/course/getlo
Content-Type: application/x-www-form-urlencoded

The `POST /api/user/getlo`endpoint is used to retrieve learning objects for a course based on the course ID.

### Request

- Method: POST
    
- Base URL: {{baseUrl}}
    
- Path: /api/user/userStats
    
- Headers:
    
    - Content-Type: application/x-www-form-urlencoded
        
- Body:
    
    - `idst` (text): User ID
        
    - `course_id` (text): The course ID for which details are to be retrieved.
        
    - `auth` (string): Authorization token
        

### Response

- `success` (boolean): Indicates the success of the request.
    
- `lo_course` (array): an array of learning objects associated with the course. Each item structure is:
    
    - `name_lo`: Name of learning object
        
    - `name_course:` Course name associated with the learning object.
        
    - `id_item:` unique identifier for the learning object
        
    - `id_course`: the course ID
        
    - `visible:` status to determine if the learning object is visible.
        
    - `type:` type of learning object.
        
    - `src`: if applcable, points to the storage location for the learning object.
        
    - `lo_status:` learning object status

Reference: https://docs.tangerine365.com/tangerine-365-enterprise/course-learning-object

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Tangerine365 Enterprise
  version: 1.0.0
paths:
  //api/course/getlo:
    post:
      operationId: course-learning-object
      summary: Course Learning Object
      description: >-
        The `POST /api/user/getlo`endpoint is used to retrieve learning objects
        for a course based on the course ID.


        ### Request


        - Method: POST
            
        - Base URL: {{baseUrl}}
            
        - Path: /api/user/userStats
            
        - Headers:
            
            - Content-Type: application/x-www-form-urlencoded
                
        - Body:
            
            - `idst` (text): User ID
                
            - `course_id` (text): The course ID for which details are to be retrieved.
                
            - `auth` (string): Authorization token
                

        ### Response


        - `success` (boolean): Indicates the success of the request.
            
        - `lo_course` (array): an array of learning objects associated with the
        course. Each item structure is:
            
            - `name_lo`: Name of learning object
                
            - `name_course:` Course name associated with the learning object.
                
            - `id_item:` unique identifier for the learning object
                
            - `id_course`: the course ID
                
            - `visible:` status to determine if the learning object is visible.
                
            - `type:` type of learning object.
                
            - `src`: if applcable, points to the storage location for the learning object.
                
            - `lo_status:` learning object status
      tags:
        - ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Course Learning Object_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                auth:
                  type: string
                idst:
                  type: string
                course_id:
                  type: string
              required:
                - auth
                - idst
                - course_id
servers:
  - url: https://localhost:8090
components:
  schemas:
    ApiCourseGetloPostResponsesContentApplicationJsonSchemaLoCourseItems:
      type: object
      properties:
        src:
          type: string
        type:
          type: string
        id_item:
          type: string
        name_lo:
          type: string
        visibile:
          type: string
        id_course:
          type: string
        lo_status:
          type: string
        name_course:
          type: string
      required:
        - src
        - type
        - id_item
        - name_lo
        - visibile
        - id_course
        - lo_status
        - name_course
      title: ApiCourseGetloPostResponsesContentApplicationJsonSchemaLoCourseItems
    Course Learning Object_Response_200:
      type: object
      properties:
        success:
          type: boolean
        lo_course:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiCourseGetloPostResponsesContentApplicationJsonSchemaLoCourseItems
      required:
        - success
        - lo_course
      title: Course Learning Object_Response_200

```

## SDK Code Examples

```python Course Learning Object_example
import requests

url = "https://localhost:8090//api/course/getlo"

payload = ""
headers = {"Content-Type": "application/x-www-form-urlencoded"}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
```

```javascript Course Learning Object_example
const url = 'https://localhost:8090//api/course/getlo';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/x-www-form-urlencoded'},
  body: new URLSearchParams('')
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Course Learning Object_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://localhost:8090//api/course/getlo"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Course Learning Object_example
require 'uri'
require 'net/http'

url = URI("https://localhost:8090//api/course/getlo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'

response = http.request(request)
puts response.read_body
```

```java Course Learning Object_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://localhost:8090//api/course/getlo")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .asString();
```

```php Course Learning Object_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://localhost:8090//api/course/getlo', [
  'form_params' => null,
  'headers' => [
    'Content-Type' => 'application/x-www-form-urlencoded',
  ],
]);

echo $response->getBody();
```

```csharp Course Learning Object_example
using RestSharp;

var client = new RestClient("https://localhost:8090//api/course/getlo");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
```

```swift Course Learning Object_example
import Foundation

let headers = ["Content-Type": "application/x-www-form-urlencoded"]

let request = NSMutableURLRequest(url: NSURL(string: "https://localhost:8090//api/course/getlo")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```