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 email@example.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:
"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.",
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).