v2
latestOpenAPI 3.0.02026-08-07103189636.5 KBContext
Upload new context and run automatic context matching
Combines two endpoints:
- Upload new context
- Run automatic context matching
The following context types are supported via the Smartling API:
- HTML: HTML files or files with content type text/html
- IMAGE: Image files
- VIDEO:
- Video file
- Link to video, such as:
- YouTube link
- Vimeo link
- Direct link to an .mp4 file
Strings to match are retrieved from the project specified by the projectId and can be filtered further by the optional matchParams parameter.
If the uploaded file doesn't match any string, the context may not be created.
Example of the raw request accepted by this API:
Content-Type: multipart/form-data; boundary
----------------------------293641908835402749402839
Content-Disposition: form-data; name="content"; filename="example.html"
Content-Type: text/html
<html>
<body>
<div> bla</div>
</body>
</html>
----------------------------293641908835402749402839
Content-Disposition: form-data; name="name"
https://your.domain.com/path/example.html
----------------------------293641908835402749402839
Content-Disposition: form-data; name="matchParams"
Content-Type: application/json
{
"contentFileUri":"example.properties",
"stringHashcodes": [],
"overrideContextOlderThanDays": 1
}
post/context-api/v2/projects/{projectId}/contexts/upload-and-match-async
Path parameters
projectIdstring uuid required
A unique project identifier. This can be found in the Smartling Dashboard under Account Settings > API.
Response
ACCEPTED