Occupations

An occupation or collection of occupations are used for people.

Authentication

This method requires Authentication

Resource Structure

This resource conforms to the following XSD

Methods

Occupations ::

  • list [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations
  • show [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/{id}

Method: list [GET]

The list method will return a list of occupations.

Notes ::

  • list and show are the only available methods for this resource; this resource cannot be updated via the API
  • By passing in the content-type of application/help in the accept header or using the {format} parameter help the API will return an html representation of the help documents for this resource (authentication not required)

Content-types ::

  • application/json
  • application/xml
  • application/help

Format ::

  • json
  • xml
  • help

Parameters ::

  • {format}
    • [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations.{format}
    • [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations?format={format}
    • [Header] Accept : {Content-type}

Sample Response ::

Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations
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 07:02:00 GMT
Content-Length: 11747

<?xml version="1.0" encoding="utf-8"?>
<occupations>
  <occupation json:Array="true" id="21" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/21">
    <name>Accounting</name>
  </occupation>
  <occupation json:Array="true" id="115" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/115">
    <name>Administrative Asst.</name>
  </occupation>
  <occupation json:Array="true" id="13" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/13">
    <name>Airline</name>
  </occupation>
  <occupation json:Array="true" id="209" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/209">
    <name>Artist</name>
  </occupation>
  ...
<occupations> 

Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations.json

Response:

HTTP/1.1 200 OK Cache-Control: private Content-Type: application/json; charset=utf-8 Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations.json Server: Microsoft-IIS/7.0 X-AspNetMvc-Version: 1.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Date: Fri, 01 May 2009 18:42:28 GMT Content-Length: 9226

{ "occupations": { "occupation": [ { "@array": "true", "@id": "21", "@uri": "{{CONSUMERDOMAIN}}/People/Occupations/21", "name": "Accounting" }, { "@array": "true", "@id": "115", "@uri": "{{CONSUMERDOMAIN}}/People/Occupations/115", "name": "Administrative Asst." }, { "@array": "true", "@id": "13", "@uri": "{{CONSUMERDOMAIN}}/People/Occupations/13", "name": "Airline" }, { "@array": "true", "@id": "209", "@uri": "{{CONSUMERDOMAIN}}/People/Occupations/209", "name": "Artist" }, { "@array": "true", "@id": "210", "@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/210", "name": "Athlete" }, ... ] } }

Method: show [GET]

The show method will return a single occupation for a given id.

Notes ::

  • list and show are the only available methods on this resource; this resource cannot be updated via the API
  • By passing in the content-type of application/xsd in the accept header or using the {format} parameter xsd the API will return an xsd for a single version of this resource (authentication not required)

Content-types ::

  • application/json
  • application/xml
  • application/xsd

Format ::

  • json
  • xml
  • xsd

Parameters ::

  • {format}
    • [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/{id}.{format}
    • [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/{id}?format={format}
    • [Header] Accept : {Content-type}
  • {id}
    • [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/{id}

Sample Response ::

Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/117

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/117
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Sun, 12 Apr 2009 06:01:27 GMT
Content-Length: 145

<?xml version="1.0" encoding="utf-8"?>
<occupation id="117" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/117">
    <name>Designer</name>
</occupation>

Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/21.json

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/21.json
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 01 May 2009 18:49:08 GMT
Content-Length: 112

{
    "occupation": {
        "@id": "21",
        "@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/People/Occupations/21",
        "name": "Accounting"
    }
}