Requirement Document
An requirementDocument
is a resource that belongs to a peopleRequirement
and can contain report data from an outside source.
Authentication
This method requires Authentication
Methods
Images ::
- show [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Requirements/{id}/Documents
- create [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Requirements/{id}/Documents
- update [PUT] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Requirements/{id}/Documents
Method: show [GET]
The show
method will return a requirementDocument
in the context of a peopleRequirement
based on context (people/{id}
).
Notes ::
- The
content-type
of this resource will only beimage/jpg
,image/png
,image/tiff
,image/gif
application/pdf
,application/msword
,text/plain
,text/richtext
,text/html
. - Document file size is limited to 1 MB.
- By passing in the
content-type
ofapplication/help
in theaccept
header or using the {format} parameterhelp
the API will return an html representation of the help documents for this resource (authentication not required) - If no document is found for the
personRequirement
will result in a 404 resource not found.
Content-types ::
- application/help
- image/jpeg
- image/png
- image/tiff
- image/gif
- application/pdf
- application/msword
- text/plain
- text/richtext
- text/html
Format ::
- help
Parameters ::
- {personID}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Requirements/{id}/Documents
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Requirements/{id}/Documents
- [Header] Accept : application/help
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/1522375/Requirements/1603454/Documents
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/pdf
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 28 Apr 2009 02:10:10 GMT
Content-Length: 2335
Request body: File stream returned.
Method: create [POST]
The create
method will create a requirementDocument
within the context of a peopleRequirement
.
Notes ::
- If an image already exists calling
create
will result in a [409] (https://CHURCHCODE.fellowshiponeapi.com/v1/Util/HttpStatusCodes.help#409) with a message of : An image already exists for this resource. Try using [PUT] People/{personID}/Requirements/{id}/Documents - This method will return a 201 - Created if successfully created
Content-types ::
- application/help
- image/jpeg
- image/png
- image/tiff
- image/gif
- application/pdf
- application/msword
- text/plain
- text/richtext
- text/html
Format ::
- image/jpeg
- image/png
- image/tiff
- image/gif
- application/pdf
- application/msword
- text/plain
- text/richtext
- text/html
Parameters ::
- {personID}
- [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Requirements/{id}/Documents
- [Header] Accept : application/help
Required Fields ::
- person id
- people requirement id
- content body
Sample Response ::
Given: [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398/Requirements/4356343/Documents
Request body: File stream posted
Response
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: image/jpeg
Location: {{CONSUMER_DOMAIN}/people/1635398/requirements/4356343/documents
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 2.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 05 May 2011 04:15:51 GMT
Content-Length: 2704
Response body: File stream created
Method: update [PUT] [POST (Low REST)]
The update
method will update a requirementDocument
in the context of a peopleRequirement
.
Notes ::
- If an image does not exist calling
update
will result in a [400] (https://CHURCHCODE.fellowshiponeapi.com/v1/Util/HttpStatusCodes.help#400) with a message of : An image already exists for this resource. Try using [PUT] People/{id}/Images
Content-types ::
- application/help
- image/jpeg
- image/png
- image/tiff
- image/gif
- application/pdf
- application/msword
- text/plain
- text/richtext
- text/html
Parameters ::
- {personID}
- [PUT] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Requirements/{id}/Documents
- [Header] Accept : application/help
Required Fields ::
- person id
- people requirement id
- content body
Sample Response ::
Given: [PUT] https://CHURCHCODE.fellowshiponeapi.com/v1/People/13707831/Requirements/123456/Documents
Request body: File stream posted
Response
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: image/jpeg
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 2.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 05 May 2011 04:29:41 GMT
Content-Length: 2704