The following REST APIs are available for working with publishing presets.
A POST method that uploads a settings (.sts) file in a preset.
http://<FMPS_server>:<port>/v16/presets/sts/upload
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. |
{
"content-type": "multipart/form-data",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
file |
form-data | Path of the settings file that you want to upload. |
multipart/form-data
Returns a HTTP 200 (Successful) response with the settings file object.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A POST method that uploads a DITAVAL file in a preset.
http://<FMPS_server>:<port>/v16/presets/ditaval/upload
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. |
{
"content-type": "multipart/form-data",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
file |
form-data | Path of the DITAVAL file that you want to upload. |
multipart/form-data
Returns a HTTP 200 (Successful) response with the DITAVAL file’s object.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A POST method that creates a preset, which contains one settings (.sts) file and an optional DITAVAL file.
http://<FMPS_server>:<port>/v16/presets
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. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
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. |
{
"Name": "test1234",
"Shared": "NO",
"ditavalid": "23525252542gsgsggxbc",
"stsfileid": "23525252542sagRWEWGGSG"
}
Returns a HTTP 200 (Successful) response with the newly created preset object.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A PUT method that updates a preset, which contains one settings (.sts) file and an optional DITAVAL file.
http://<FMPS_server>:<port>/v16/presets/:id
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. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
id | String | A unique ID of the preset that you want to update. |
5e4302fafdfdfadsfdfasgafsafgsag
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. |
{
"Name": "test1234",
"Shared": "NO",
"stsfileid": "{{UStsId}}",
"stsdirty":"YES",
"ditavalid": "23525252542gsgsggxbc",
"ditadirty":"YES"
}
Returns a HTTP 200 (Successful) response.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A DELETE method that deletes a preset using the preset’s ID.
http://<FMPS_server>:<port>/v16/presets/:id
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. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
id | String | The unique ID of the preset that you want to delete. |
5e4302fafdfdfadsfdfasgafsafgsag
Returns a HTTP 200 (Successful) response with the deleted preset object.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A GET method that retrieves all presets available in the system.
http://<FMPS_server>:<port>/v16/presets
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. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Returns a HTTP 200 (Successful) response with an array of all preset objects.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A GET method that retrieves an existing output preset using its unique ID.
http://<FMPS_server>:<port>/v16/presets/:id
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. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
id | String | The unique ID of the preset that you want to retrieve. |
5e4302fafdfdfadsfdfasgafsafgsag
Returns a HTTP 200 (Successful) response with the preset object.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |