LanguageResource Resource

Resource to manage cms languages

GET /language

Load a list of languages.
The result can be filtered by

  • id
  • globalId
  • name
  • code
and sorted by
  • id
  • globalId
  • name
  • code

Request Parameters
name type description default constraints
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
200 The list of languages is returned.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json LanguageList (JSON) response containing a list of languages
application/xml object

Example

Request
GET /language
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "deleteform", "delete" ],
    "property2" : [ "updatetemplates", "userassignment" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /language

Create a new content language

Request Body
media type data type description
application/json ContentLanguage (JSON) language
application/xml object
Response Codes
code condition
200 The language has been created.
400 No request body was sent.
400 Not all required fields had non-null values.
409 The given code or language name is already used by another language.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentLanguageResponse (JSON) Response containing the created content language
application/xml object

Example

Request
POST /language
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "globalId" : "...",
  "code" : "...",
  "name" : "..."
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "language" : {
    "id" : 12345,
    "globalId" : "...",
    "code" : "...",
    "name" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /language/list

This method has been deprecated.

Load all available languages

Response Codes
code condition
200 The list of languages is returned.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json LanguageListResponse (JSON) list of available languages
application/xml object

Example

Request
GET /language/list
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "languages" : [ {
    "id" : 12345,
    "globalId" : "...",
    "code" : "...",
    "name" : "..."
  }, {
    "id" : 12345,
    "globalId" : "...",
    "code" : "...",
    "name" : "..."
  } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /language/{id}

Delete the language with given ID

Request Parameters
name type description
id path language ID
Response Codes
code condition
204 Language {id} was deleted.
404 Language {id} was not found.
409 Language {id} cannot be deleted, because it is used.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json object (JSON) empty response
application/xml object

Example

Request
DELETE /language/{id}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

GET /language/{id}

Load the language with given id

Request Parameters
name type description
id path language ID
Response Codes
code condition
200 Language {id} is returned.
404 Language {id} was not found.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentLanguageResponse (JSON) Response containing the requested language
application/xml object

Example

Request
GET /language/{id}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "language" : {
    "id" : 12345,
    "globalId" : "...",
    "code" : "...",
    "name" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /language/{id}

Update the language with given id

Request Parameters
name type description
id path language ID
Request Body
media type data type description
application/json ContentLanguage (JSON) Updated language
application/xml object
Response Codes
code condition
200 Language {id} was updated.
400 No request body was sent.
400 Not all required fields had non-null values.
404 Language {id} was not found.
409 The given code or language name is already used by another language.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentLanguageResponse (JSON) Response containing the updated language
application/xml object

Example

Request
PUT /language/{id}
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "globalId" : "...",
  "code" : "...",
  "name" : "..."
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "language" : {
    "id" : 12345,
    "globalId" : "...",
    "code" : "...",
    "name" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}