Get a list of type summaries or message bundles

get/contents/{namespace}

Returns a list of type summaries or message bundles as properties files or a ZIP file. Retrieves one of five resources by specifying the http header Accept and Accept-Item. Only the second item requires the http header Accept-Language and returns a set of all message bundles that belong to the namespace.

 resourceAccept http request headerAccept-Item http request header
1a set of types summaryapplication/json or application/vnd.sas.collection+jsonapplication/json or application/vnd.sas.localization.content.type+json
2a set of message bundlesapplication/vnd.sas.collection+jsonapplication/vnd.sas.localization.content+json
3message bundles as the properties filesmultipart/form-dataapplication/vnd.sas.properties.file
4message bundles as a ZIP file using MIMEmultipart/form-dataapplication/zip
5message bundles as a ZIP fileapplication/zip 
Retrieving (exporting) the message bundles as the properties files or a ZIP file.

The properties file names are followed by the naming convention, which is described in the section "import/export the message bundles as properties files". In the http response, the properties files, the ZIP file, or the ZIP file that is in the MIME multipart/form-data format RFC7578. The character encoding of the properties files is utf-8.

When the Accept http header is application/zip, the http response body is the content of the ZIP file. The Accept-Item http header must be specified when the Accept http header is application/json, application/vnd.sas.collection+json, or multipart/form-data. The available values are "application/zip" and "application/vnd.sas.properties.file". When the "application/zip" is specified for the Accept-Item http header, a ZIP file is returned in a MIME part. When the "application/vnd.sas.properties.file" is specified, each properties file is returned in a MIME part.

Using the curl command, a ZIP file can be downloaded.
Here is an example.

HOST=[Your cluster address]
TOKEN=[Access token]
curl -X GET -o archive.zip \
-H "authorization:bearer $TOKEN" \
-H "Accept: application/zip" \
https://$HOST/localization/contents/entertainment
The example downloads the archive.zip file that contains all the properties files in the namespace "entertainment".

Request Samples

1

Response Samples

1{
2 "accept": "string",
3 "count": 0,
4 "items": [
5 {
6 "id": "string",
7 "links": [
8 {
9 "href": "string",
10 "itemType": "string",
11 "method": "string",
12 "rel": "string",
13 "responseItemType": "string",
14 "responseType": "string",
15 "title": "string",
16 "type": "string",
17 "uri": "string"
18 }
19 ],
20 "namespace": "string",
21 "version": 1
22 }
23 ],
24 "limit": 0,
25 "links": [
26 {
27 "href": "string",
28 "itemType": "string",
29 "method": "string",
30 "rel": "string",
31 "responseItemType": "string",
32 "responseType": "string",
33 "title": "string",
34 "type": "string",
35 "uri": "string"
36 }
37 ],
38 "name": "string",
39 "start": 0,
40 "version": 1
41}

Path Parameters

NameTypeRequiredDescription
namespace
string
true

The namespace of the message bundle.

Query Parameters

NameTypeRequiredDescription
filter
string
false

Query filter, supported fields are type and id.

limit
integer<int32>
false

Maximum number of items to retrieve. Defaults to 30 for a set of type summary. 0 for the message bundles, means all the message bundles.

Default:
30
start
integer<int32>
false

Offset of first item to retrieve (0-based). Defaults to 0.

Default:
0

Header Parameters

NameTypeRequiredDescription
Accept-Item
string
false
Allowed values:
application/jsonapplication/vnd.sas.localization.content.type+jsonapplication/vnd.sas.properties.fileapplication/zip
Accept-Language
string
false

The Accept-Language http header is required only when the Accept http header is "application/vnd.sas.collection+json" and the Accept-Item http header is "application/vnd.sas.localization.content+json". This API returns the resolved bundles for the local specified in the Accept-Language. The resolved bundles have the full set of message keys. The locale follows BCP-47. The bundle id consists of three items <service name>-<bundle type>-<bundle format>. See the Terminology section for detail.

Accept
string
true
Allowed values:
application/jsonapplication/vnd.sas.sas.collection+jsonmultipart/form-data

Responses

StatusMeaningDescription
200OK

The request succeeded.

HeadersSchema