[go: up one dir, main page]

0% found this document useful (0 votes)
181 views4 pages

File

This document describes an API endpoint for adding a text attachment to a media object. The POST request requires a JSON request body containing authentication details like a token, the media object key and structure, the form and version associated with the object, the item name, and the text to add. A successful response returns a status of "Success" and the sequence number. Error responses return appropriate status codes and error details.

Uploaded by

Khawaja Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
181 views4 pages

File

This document describes an API endpoint for adding a text attachment to a media object. The POST request requires a JSON request body containing authentication details like a token, the media object key and structure, the form and version associated with the object, the item name, and the text to add. A successful response returns a status of "Success" and the sequence number. Error responses return appropriate status codes and error details.

Uploaded by

Khawaja Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Add Text Attachment v2

POST
/jderest/v2/file/addtext

Add a text attachment for the given media object key.

Request
Supported Media Types
application/json
Header Parameters
jde-AIS-Auth(optional): string
jde-AIS-Auth-Device(optional): string
Body (MediaObjectAddTextRequestV2)
Request object for adding a new text media object with the input name and text
provided.
Type: object
Request object for adding a new text media object with the input name and text
provided.
{
"type":"object",
"required":[
"formName",
"inputText",
"moKey",
"moStructure",
"version"
],
"properties":{
"environment":{
"type":"string",
"description":"Specify the environment to use for login. If not
specified, the default environment configured for the AIS Server will be used."
},
"role":{
"type":"string",
"description":"The role to use for login. If not specified, the default
role configured for the AIS Server will be used."
},
"jasserver":{
"type":"string",
"description":"The HTML (JAS) Server to use for login. If not
specified, the default HTML Server configured for the AIS Server will be used."
},
"token":{
"type":"string",
"description":"The AIS token, which is required if other authentication
methods are not being used."
},
"deviceName":{
"type":"string",
"description":"An identifier for the device making the service call. If
not provided, the requesting IP address is used."
},
"psToken":{
"type":"string",
"description":"Used for logging in with psToken. Primarily used by the
HTML Server to establish a session with the AIS Server."
},
"username":{
"type":"string",
"description":"JD Edwards EnterpriseOne username, which is required if
other authentication methods are not being used."
},
"password":{
"type":"string",
"description":"The JD Edwards EnterpriseOne password, which is required
if other authentication methods are not being used."
},
"moStructure":{
"type":"string",
"description":"The media object data structure name, for example GT0801
or ABGT, which is a key to the F00165 table where media objects are stored."
},
"moKey":{
"type":"array",
"description":"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.",
"items":{
"type":"string"
}
},
"formName":{
"type":"string",
"description":"The name of the form the media object is associated with
(for example W01012A)."
},
"version":{
"type":"string",
"description":"The version of the application the media object is
associated with (for example ZJDE0001)."
},
"itemName":{
"type":"string",
"description":"The name of the text media object item."
},
"inputText":{
"type":"string",
"description":"The text to be written to the new text media object."
}
},
"description":"Request object for adding a new text media object with the input
name and text provided."
}
Back to Top
Response
Supported Media Types
application/json
200 Response
Successful Execution
Body (MediaObjectAddTextResponseV2)
Type: object
Response to service request to add media object text.
addTextStatus(optional): string
error(optional): string
sequence(optional): integer(int32)
400 Response
Bad Request - Invalid JSON Input
403 Response
Authorization Failure
415 Response
Invalid Content-Type Header - Must use application/json
444 Response
Invalid Token
Body (ServiceErrorResponse)
Type: object
Error Response
errorText(optional): string
exception(optional): string
message(optional): string
timeStamp(optional): string
type(optional): string
userDefinedErrorText(optional): string
500 Response
Server Failed to Process Request
Body (ServiceErrorResponse)
Type: object
Error Response
errorText(optional): string
exception(optional): string
message(optional): string
timeStamp(optional): string
type(optional): string
userDefinedErrorText(optional): stringBack to Top
Examples
Example Request

The following shows an example of a media object request to add a text media object
based on the key. 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/addtext -d
{
"token":
"044ZVursCGKG8tBX5dOpJ3Wwq7JEE26Q3NP3RChe9V3HZc=MDE5MDE0NzExNTc3NTU0NzIxNDgyNzcyNjE
wLjEzOS4xMTEuMTMzMTUzMDEyNDExNzUxNg==",
"moStructure": "ABGT",
"moKey": [
"7500"
],
"formName": "P01012_W01012B",
"version": "ZJDE0001",
"itemName": "My New Text Item",
"inputText": "Add this \ntext"
}

Example Response

The following example shows the contents of the response body.

{
"addTextStatus": "Success",
"sequence": 12
}

You might also like