REST APIs for working with presets

The following REST APIs are available for working with publishing presets.

Upload an STS file

A POST method that uploads a settings (.sts) file in a preset.

Request URL

http://<FMPS_server>:<port>/v16/presets/sts/upload

Header
Name Type Description
content-type String Type of content that is sent in the request.
X-Access-Token String The authentication token that is sent in the request.
Header example
{
  "content-type": "multipart/form-data",
  "X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Request body
Name Type Description
file form-data Path of the settings file that you want to upload.
JSON body example
multipart/form-data
Successful response

Returns a HTTP 200 (Successful) response with the settings file object.

Error response
Code Type Description
400 String A bad request is sent.

Upload a DITAVAL file

A POST method that uploads a DITAVAL file in a preset.

Request URL

http://<FMPS_server>:<port>/v16/presets/ditaval/upload

Header
Name Type Description
content-type String Type of content that is sent in the request.
X-Access-Token String The authentication token that is sent in the request.
Header example
{
  "content-type": "multipart/form-data",
  "X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Request body
Name Type Description
file form-data Path of the DITAVAL file that you want to upload.
JSON body example
multipart/form-data
Successful response

Returns a HTTP 200 (Successful) response with the DITAVAL file’s object.

Error response
Code Type Description
400 String A bad request is sent.

Create a preset

A POST method that creates a preset, which contains one settings (.sts) file and an optional DITAVAL file.

Request URL

http://<FMPS_server>:<port>/v16/presets

Header
Name Type Description
content-type String Type of content that is sent in the request.
X-Access-Token String The authentication token that is sent in the request.
Header example
{
  "content-type": "application/json",
  "X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Request body
Name Type Description
Name String A unique name of the preset that you want to create.
Shared String Specify whether the preset is shared or not. Possible values are “NO” and “YES”.
ditavalid String Unique ID of the DITAVAL file to associate with the preset. This is an optional parameter.
stsfileid String Unique ID of the settings (.sts) file to associate with the preset. This is a mandatory parameter.
JSON body example
{
    "Name": "test1234",
    "Shared": "NO",
    "ditavalid": "23525252542gsgsggxbc",
    "stsfileid": "23525252542sagRWEWGGSG"
}
Successful response

Returns a HTTP 200 (Successful) response with the newly created preset object.

Error response
Code Type Description
400 String A bad request is sent.

Update a preset

A PUT method that updates a preset, which contains one settings (.sts) file and an optional DITAVAL file.

Request URL

http://<FMPS_server>:<port>/v16/presets/:id

Header
Name Type Description
content-type String Type of content that is sent in the request.
X-Access-Token String The authentication token that is sent in the request.
Header example
{
  "content-type": "application/json",
  "X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Parameter
Name Type Description
id String A unique ID of the preset that you want to update.
Parameter example
5e4302fafdfdfadsfdfasgafsafgsag
Request body
Name Type Description
Name String

A unique name of the preset that you want to update.

Note: The name of the preset cannot be updated.
Shared String Specify whether the preset is shared or not. Possible values are “NO” and “YES”.
ditavalid String Unique ID of the DITAVAL file to associate with the preset. This is an optional parameter.
ditadirty String Specified only if the DITAVAL file is updated. Possible values are YES or NO.
stsfileid String Unique ID of the settings (.sts) file to associate with the preset. This is a mandatory parameter.
stsdirty String Specified only if the settings file is updated. Possible values are YES or NO.
JSON body example
{
    "Name": "test1234",
    "Shared": "NO",
    "stsfileid": "{{UStsId}}",
    "stsdirty":"YES",
    "ditavalid": "23525252542gsgsggxbc",
    "ditadirty":"YES"
}
Successful response

Returns a HTTP 200 (Successful) response.

Error response
Code Type Description
400 String A bad request is sent.

Delete a preset

A DELETE method that deletes a preset using the preset’s ID.

Request URL

http://<FMPS_server>:<port>/v16/presets/:id

Header
Name Type Description
content-type String Type of content that is sent in the request.
X-Access-Token String The authentication token that is sent in the request.
Header example
{
  "content-type": "application/json",
  "X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Parameter
Name Type Description
id String The unique ID of the preset that you want to delete.
Parameter example
5e4302fafdfdfadsfdfasgafsafgsag
Successful response

Returns a HTTP 200 (Successful) response with the deleted preset object.

Error response
Code Type Description
400 String A bad request is sent.

Get all presets

A GET method that retrieves all presets available in the system.

Request URL

http://<FMPS_server>:<port>/v16/presets

Header
Name Type Description
content-type String Type of content that is sent in the request.
X-Access-Token String The authentication token that is sent in the request.
Header example
{
  "content-type": "application/json",
  "X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Successful response

Returns a HTTP 200 (Successful) response with an array of all preset objects.

Error response
Code Type Description
400 String A bad request is sent.

Get a specific output preset

A GET method that retrieves an existing output preset using its unique ID.

Request URL

http://<FMPS_server>:<port>/v16/presets/:id

Header
Name Type Description
content-type String Type of content that is sent in the request.
X-Access-Token String The authentication token that is sent in the request.
Header example
{
  "content-type": "application/json",
  "X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Parameter
Name Type Description
id String The unique ID of the preset that you want to retrieve.
Parameter example
5e4302fafdfdfadsfdfasgafsafgsag
Successful response

Returns a HTTP 200 (Successful) response with the preset object.

Error response
Code Type Description
400 String A bad request is sent.

May 30, 2024

Legal Notices | Online Privacy Policy