Template:REST MultiPart
From AgileApps Support Wiki
Additional segments for multipart APIs.
Multipart Requests for Raw Data
Add a ...
(Add is always appropriate, because an existing file is being imported.)
- Method
- POST
- URI
- https://{domain}/networking/rest/__resourceName__?{query_parameters}
- Query Parameters
- Introductory sentence, if any
- parameter1 - Description
- parameter2
- If true, ...
- If false, ... (default)
- For more information, see: Specifying Query Parameters in REST APIs
- Request
- A multipart request with file part for the ... and an XML/JSON part with processing information.
- Here's a sample request that ...:
Content-Type: multipart/form-data; boundary=.............................103832778631715 --.............................103832778631715 Content-Disposition: form-data; name="xml_part"; Content-Type=application/xml; <platform> <record> ...XML DATA GOES HERE... </record> </platform> .............................103832778631715 Content-Disposition: form-data; name="file_part"; filename="somefile.ext" Content-type: application/octet-stream {contents of file} .............................103832778631715--
- Learn more: REST API:Multipart Request
- Response
<platform> <message> <code>0</code> <description>Success</description> <id>...</id> // ID of the added resource </message> </platform>
- See also: REST API:Error Codes
Update a ...
- Method
- PUT
- URI
- https://{domain}/networking/rest/__resourceName__/{recordId}?{query_parameters}
- Query Parameters
- Introductory sentence, if any
- parameter1 - Description
- parameter2
- If true, ...
- If false, ... (default)
- For more information, see: Specifying Query Parameters in REST APIs</nowiki>
- Request
- The format of the request is identical to that shown in Add a __resourceName__.
- Response
<platform> <message> <code>0</code> <description>Success</description> <id>...</id> // ID of the updated resource </message> </platform>
- See also: REST API:Error Codes
Sample ... Client to ...
ex: Sample Login Client, Sample HTTP Client to ...
- The __NAME__Client demo program extends the BaseClient class to __DO SOMETHING__.
...program here...