Secure Code Warrior has a range of helpful videos for your learning enjoyment. There may be times you'd like to embed or link to these videos for instructional or educational purposes.
This article will go through how you can do this by leveraging our Direct linking API
Please follow the steps below to achieve this.
- First, you'll need a partner ID. To get one, send a request to integration-partners@securecodewarrior.com
- Get a list of all the available mapping lists by calling the 'mapping-lists' endpoint
- Pick the mapping list you are interested in (e.g. Common Weakness Enumeration (CWE)) and copy the 'slug' (e.g. cwe)
- Call the Get Mapping List Items endpoint and pass the slug value. This will return all mapping keys. Please note there may be several pages of mapping keys.
- Call the Get Trial Link endpoint to retrieve the video URL for each mapping key. This URL can be used in HTML video embeds within your application or website.
Below is an example request:
https://integration-api.securecodewarrior.com/api/v1/trial?Id=your_partner_id&MappingList=cwe&MappingKey=89&LanguageKey=java
And response:
{
"url": "https://portal.securecodewarrior.com/?utm_source=partner-integration:your_partner_id#/contextual-microlearning/web/injection/sql/java/vanilla",
"name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')",
"description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.",
"videos": [
"https://media.securecodewarrior.com/v2/module_01_sql_injection.mp4"
],
...
}
Our Direct Linking button library is also available to simplify the retrieval of video URLs from the API. Please find the documentation for it available here (specifically the Fetching Training Data section).
Comments
0 comments
Please sign in to leave a comment.