> 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.

# Get Course Progress in Percentage

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

The API endpoint `{{baseUrl}}/api/course/courseProgressPercentage` is a POST request that is used to get the completion percentage of a user for a course.

### Request

- Method: POST
    
- Base URL: {{baseUrl}}
    
- Path: /api/course/courseProgressPercentage
    
- Headers:
    
    - Content-Type: application/x-www-form-urlencoded
        

### Request Body

The request body type is **`x-www-form-urlencoded`**

- `course_id` (string): Course ID
    
- `idst` (string): User ID
    
- `auth` (string): Authentication token
    

### Response

The response will be in JSON format and will include the following fields:

- `success` (string): Indicates the success status of the request.
    
- `data` (object): Contains properties of the progress percentage for that course
    
    - `complete_percentage` (number): Percentage of the course completed
        
    - `failed_percentage` (number): Percentage of the course failed.

Reference: https://docs.tangerine365.com/tangerine-365-enterprise/get-course-progress-in-percentage

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Tangerine365 Enterprise
  version: 1.0.0
paths:
  //api/course/courseProgressPercentage:
    post:
      operationId: get-course-progress-in-percentage
      summary: Get Course Progress in Percentage
      description: >-
        The API endpoint `{{baseUrl}}/api/course/courseProgressPercentage` is a
        POST request that is used to get the completion percentage of a user for
        a course.


        ### Request


        - Method: POST
            
        - Base URL: {{baseUrl}}
            
        - Path: /api/course/courseProgressPercentage
            
        - Headers:
            
            - Content-Type: application/x-www-form-urlencoded
                

        ### Request Body


        The request body type is **`x-www-form-urlencoded`**


        - `course_id` (string): Course ID
            
        - `idst` (string): User ID
            
        - `auth` (string): Authentication token
            

        ### Response


        The response will be in JSON format and will include the following
        fields:


        - `success` (string): Indicates the success status of the request.
            
        - `data` (object): Contains properties of the progress percentage for
        that course
            
            - `complete_percentage` (number): Percentage of the course completed
                
            - `failed_percentage` (number): Percentage of the course failed.
      tags:
        - ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Get Course Progress in
                  Percentage_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:
    ApiCourseCourseProgressPercentagePostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        failed_percentage:
          type: integer
        complete_percentage:
          type: integer
      required:
        - failed_percentage
        - complete_percentage
      title: >-
        ApiCourseCourseProgressPercentagePostResponsesContentApplicationJsonSchemaData
    Get Course Progress in Percentage_Response_200:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/ApiCourseCourseProgressPercentagePostResponsesContentApplicationJsonSchemaData
        success:
          type: string
      required:
        - data
        - success
      title: Get Course Progress in Percentage_Response_200

```

## SDK Code Examples

```python Get Course Progress in Percentage_example
import requests

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

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

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

print(response.json())
```

```javascript Get Course Progress in Percentage_example
const url = 'https://localhost:8090//api/course/courseProgressPercentage';
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 Get Course Progress in Percentage_example
package main

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

func main() {

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

	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 Get Course Progress in Percentage_example
require 'uri'
require 'net/http'

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

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 Get Course Progress in Percentage_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Get Course Progress in Percentage_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Get Course Progress in Percentage_example
using RestSharp;

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

```swift Get Course Progress in Percentage_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://localhost:8090//api/course/courseProgressPercentage")! 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()
```