Update Text Attachment v2
/v2/file/updatetext
Request
- application/json
-
jde-AIS-Auth: string
Token
-
jde-AIS-Auth-Device: string
Device Name
-
jde-AIS-MonitorOnStart: boolean
Monitor on Start
-
jde-AIS-MonitorRequest: string
Monitor RequestAllowed Values:
[ "monitorRequest", "monitorRequestIO" ]
object
-
appendOnNewLine:
boolean
When appending text the default behavior will add a line before each append (true). To omit the additional line pass false.
-
appendText:
boolean
Indicates if the text sent should be appended to existing text (true), or replace it (false).
-
deviceName:
string
An identifier for the device making the service call. If not provided, the requesting IP address is used.
-
environment:
string
Specify the environment to use for login. If not specified, the default environment configured for the AIS Server will be used.
-
formName(required):
string
The name of the form the media object is associated with (for example W01012A).
-
inputText(required):
string
The text to be updated to the first text media object for the structure and key.
-
itemName:
string
If a value is sent, the name of the text item will be updated with the value sent.
-
jasserver:
string
The HTML (JAS) Server to use for login. If not specified, the default HTML Server configured for the AIS Server will be used.
-
moKey(required):
array moKey
An array of media object key values. You must pass the values in the same order that they appear in the data structure. The key values will be converted into the bar delimited key of the media object record stored in the F00165 table.
-
moStructure(required):
string
The media object data structure name, for example GT0801 or ABGT, which is a key to the F00165 table where media objects are stored.
-
password:
string
The JD Edwards EnterpriseOne password, which is required if other authentication methods are not being used.
-
psToken:
string
Used for logging in with psToken. Primarily used by the HTML Server to establish a session with the AIS Server.
-
role:
string
The role to use for login. If not specified, the default role configured for the AIS Server will be used.
-
sequence:
integer(int32)
The sequence number of the text item to update. A value of zero is the default and will update the first text item.
-
token:
string
The AIS token, which is required if other authentication methods are not being used.
-
username:
string
JD Edwards EnterpriseOne username, which is required if other authentication methods are not being used.
-
version(required):
string
The version of the application the media object is associated with (for example ZJDE0001).
array
Response
- application/json
200 Response
object
-
mediaObjects:
array mediaObjects
The list of media object items.
array
-
Array of:
object MediaObjectListItem
MediaObjectListItem is an individual media object within the response returned from the list operation.
object
-
data:
string
If this is an image and data was requested, this will contain a Base64 encoded string of the image, scaled down to thumbnail size based on the request.
-
deviceName:
string
An identifier for the device making the service call. If not provided, the requesting IP address is used.
-
downloadUrl:
string
For file type media objects this is the download URL needed ot download the item. Pass this value into a download request.
-
environment:
string
Specify the environment to use for login. If not specified, the default environment configured for the AIS Server will be used.
-
file:
string
The location of the file for this media object.
-
formName(required):
string
The name of the form the media object is associated with (for example W01012A).
-
isDefaultImage:
boolean
Indicates that this image was set as the default image for this media object structure and key.
-
isImage:
boolean
Indicates the file is an image.
-
isOLE:
boolean
Indicates the item is an OLE item.
-
isShortCut:
boolean
Indicates the item is a shortcut.
-
isText:
boolean
Indicates the item is a text type media object.
-
isUpdated:
boolean
Indicates the item has been updated.
-
isURL:
boolean
Indicates the item is a URL type media object.
-
itemName:
string
The name of the media object item.
-
jasserver:
string
The HTML (JAS) Server to use for login. If not specified, the default HTML Server configured for the AIS Server will be used.
-
link:
string
The if it's a URL type it will have the URL, for file types it will have the file location, for text types this field is not returned.
-
moKey(required):
array moKey
An array of media object key values. You must pass the values in the same order that they appear in the data structure. The key values will be converted into the bar delimited key of the media object record stored in the F00165 table.
-
moStructure(required):
string
The media object data structure name, for example GT0801 or ABGT, which is a key to the F00165 table where media objects are stored.
-
moType:
integer(int32)
The media object type, 0-Text, 1-File, 5-URL.
-
password:
string
The JD Edwards EnterpriseOne password, which is required if other authentication methods are not being used.
-
psToken:
string
Used for logging in with psToken. Primarily used by the HTML Server to establish a session with the AIS Server.
-
queue:
string
If the file was from the media object queue, the queue name will be returned.
-
role:
string
The role to use for login. If not specified, the default role configured for the AIS Server will be used.
-
sequence:
integer(int32)
The sequence number of the media object item.
-
token:
string
The AIS token, which is required if other authentication methods are not being used.
-
updateDate:
string
The date the media object was last updated.
-
updateHourOfDay:
integer(int32)
The hour of the day the item was last updated.
-
updateMinuteOfHour:
integer(int32)
The minute of the hour of the day the item was last updated.
-
updateSecondOfMinute:
integer(int32)
The second of the minute of the hour day the item was last updated.
-
updateUserID:
string
The user that last updated the item.
-
username:
string
JD Edwards EnterpriseOne username, which is required if other authentication methods are not being used.
-
version(required):
string
The version of the application the media object is associated with (for example ZJDE0001).
array
400 Response
403 Response
415 Response
444 Response
object
-
errorText:
string
-
exception:
string
The class of the exception if an exception was thrown.
-
exceptionId:
string
ExceptionId, only if an exception record was written to the F980060
-
message:
string
Details about the error.
-
status:
string
Allowed Values:
[ "ERROR", "WARNING" ]
Status determined by exception handling -
timeStamp:
string
The timestamp indicating the time the error message was returned.
-
type:
string
Optional type of error
-
userDefinedErrorText:
string
Optional error text added to an orchestration step.
500 Response
object
-
errorText:
string
-
exception:
string
The class of the exception if an exception was thrown.
-
exceptionId:
string
ExceptionId, only if an exception record was written to the F980060
-
message:
string
Details about the error.
-
status:
string
Allowed Values:
[ "ERROR", "WARNING" ]
Status determined by exception handling -
timeStamp:
string
The timestamp indicating the time the error message was returned.
-
type:
string
Optional type of error
-
userDefinedErrorText:
string
Optional error text added to an orchestration step.
Examples
Example Request - First Text
The following shows an example of a media object request to update the first text media object. This service updates (or creates) the first text media object based on the key. You may indicate if the new text should append or overwrite the existing text. The token passed in this example was received from a separate token request.
curl -i -X POST -H "Content-Type:application/json" http://ais_server_url/v2/file/updatetext -d { "token": "0444WnTJVRGpnlwN4OCRXY9Q3m74QaYWYlNM0u3TUCVl+8=MDE5MDA4NjcwMzAwMTkzOTg3NDE1NzUyNE15RGV2aWNlMTQ4MDcwMjkzMjI1OQ==", "moStructure": "ABGT", "moKey": [ "7500" ], "formName": "P01012_W01012B", "version": "ZJDE0001", "inputText": "Text from AIS Service Call.", "appendText": false }
Example Response - First Text
The following example shows the contents of the response body.
{ "updateTextStatus": "Success" }
Example Request - By Sequence
The following shows an example of a media object request to update the text item at sequence 12. This example also indicates a request to overwrite the existing text (appendText is false).
curl -i -X POST -H "Content-Type:application/json" http://ais_server_url/v2/file/updatetext -d { "token": "0444WnTJVRGpnlwN4OCRXY9Q3m74QaYWYlNM0u3TUCVl+8=MDE5MDA4NjcwMzAwMTkzOTg3NDE1NzUyNE15RGV2aWNlMTQ4MDcwMjkzMjI1OQ==", "moStructure": "ABGT", "moKey": [ "7500" ], "sequence": 12, "appendText": false, "formName": "P01012_W01012B", "version": "ZJDE0001", "itemName": "Updated Name", "inputText": "Overwrite text in sequence 12.", "appendText": false }
Example Response - By Sequence
The following example shows the contents of the response body.
{ "updateTextStatus": "Success" }
Example Response - Failure
The following example shows the contents of the response body in the case of failure. The cause could be that the text item for that sequence does not exist, or that the item for that sequence is not a text type media object.
{ "error": "Invalid Sequence for Text Item: 15", "updateTextStatus": "Failure" }