Strings

List all source strings (POST)

Changed on

Returns source strings from Smartling. You can get strings by specifying a file you want strings for, or you can specify individual strings by hashcode.

If you do not specify at least one of these parameters (hashcodes or fileUri) no results will be returned.

Note: If you use this call to get strings that are not added via the Strings API, you may see differences in the response.

You may see a value for parsedStringText but a null value for stringText. The stringText records the raw input received by the Strings API, and therefore will only appear for strings uploaded via the Strings API. If you are getting a GDN string, the original placeholder values you used will not be returned as these are not saved by Smartling. GDN strings will have placeholders in the format {0}, {1}, etc.

post/strings-api/v2/projects/{projectUid}/source-strings

Request

  • Base URL
    https://api.smartling.com
  • Auth
    HTTP bearer

Path parameters

projectUidstring required

Unique identifier of a Smartling project — 9 lowercase alphanumeric characters.

Example:84c012a33

A unique project identifier. This can be found in the Smartling Dashboard under Account Settings > API.

Request body

hashcodesHashcode[]

Hashcodes for each string you want to get source strings for.

fileUristring

URI path of a source file within a Smartling project.

limitinteger

By default, responses will be limited to 500 per request. This is also the maximum allowed value.

offsetinteger

Pagination setting. Default is 0.

showPlaceholderValuesboolean

When true (default), placeholder tokens are resolved to display values. When false, internal placeholder format ({0}, {1}, etc.) is preserved.

Example request

{
  "hashcodes": [
    "d41d8cd98f00b204e9800998ecf8427e"
  ],
  "fileUri": "/content/en/home.json"
}

Response

OK

Example response

{
  "response": {
    "data": {
      "items": [
        {
          "hashcode": "d41d8cd98f00b204e9800998ecf8427e",
          "keys": [
            {
              "fileUri": "/content/en/home.json"
            }
          ],
          "contentFileStringInstructions": [
            {
              "fileUri": "/content/en/home.json"
            }
          ]
        }
      ]
    }
  }
}

Changes