Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Template:Orion/ServerAPI"

(Revert back to John's version of 20:26, 10 January 2011 -- I give up, this isn't working)
(Add template section to document all possible status codes for a request)
Line 8: Line 8:
 
| resphead = 201 OK
 
| resphead = 201 OK
 
| explain = Detailed explanation
 
| explain = Detailed explanation
 +
| codes = Status codes
 
}}</pre>|2={{Orion/ServerAPI
 
}}</pre>|2={{Orion/ServerAPI
 
| overview = Obtain file contents
 
| overview = Obtain file contents
Line 14: Line 15:
 
| resphead = 201 OK
 
| resphead = 201 OK
 
| explain = Detailed explanation
 
| explain = Detailed explanation
 +
| codes = Status codes
 
}}}}
 
}}}}
  
Line 36: Line 38:
 
'''Explain'''
 
'''Explain'''
 
:Detailed explanation of this method.
 
:Detailed explanation of this method.
 +
 +
'''Codes'''
 +
:Description of the different status codes
  
 
</noinclude>
 
</noinclude>
Line 53: Line 58:
 
;Detailed Explanation
 
;Detailed Explanation
 
:{{{explain}}}
 
:{{{explain}}}
 +
;Status Codes
 +
:{{{codes}}}
 
</includeonly>
 
</includeonly>

Revision as of 13:51, 11 September 2017

This is a template for documenting REST-oriented Web APIs.

Markup Rendering
{{Orion/ServerAPI
| overview = Obtain file contents
| method = GET
| reqhead = /file/myfile.txt HTTP/1.1
| resphead = 201 OK
| explain = Detailed explanation
| codes = Status codes
}}
Overview
Obtain file contents
HTTP Method
GET
Example Request
GET /file/myfile.txt HTTP/1.1

  
Example Response
HTTP/1.1 201 OK


Detailed Explanation
Detailed explanation


Method

The HTTP Method

Overview

A textual overview of the purpose of the method

reqhead

The HTTP headers of the request

reqbody

The body of the HTTP request

resphead

The HTTP headers of the response

respbody

The body of the HTTP response

Explain

Detailed explanation of this method.

Codes

Description of the different status codes


Back to the top