# ACM 3.0 API API documentation version v1

http://armdec6acm1.armedia.com/acm/api/v1

### /plugin

#### /plugin/casefile post

post

create a a new case file, or update an existing one.

#### post /plugin/casefile

create a a new case file, or update an existing one.

### Body

Type: application/json

Example:

    {
          "caseType": "Better Business Bureau",
          "title": "Dupree's Diamond Blues"
          // this request will create a case file since no id is specified.
          // to update a case file, include the id property, as shown in the
          // example response.
        }

## HTTP status code 200

Case file successfully created or updated.

### Body

Type: application/json

Example:

    {
          "id":508,
          "caseNumber":"20141006_508",
          "caseType":"Better Business Bureau",
          "title":"Dupree's Diamond Blues",
          "status":"DRAFT",
          "details":null,
          "created":"2014-10-06T20:28:42.080+0000",
          "creator":"ebmillar",
          "modified":"2014-10-06T20:28:42.080+0000",
          "modifier":"ebmillar",
          "closed":null,
          "disposition":null,
          "priority" : "High",
          "participants" : [],
          "dueDate" : null,
          "approvers" : null,
          "ecmFolderPath":"/Sites/acm/documentLibrary/Case Files/20141006_508",
          "ecmFolderId":"workspace://SpacesStore/7c4c7c0c-b4dd-4e3d-aa8c-e6e4a9ea2e52",
          "childObjects":[],
          "associationsFromObjects":[]
        }

#### /plugin/casefile/byId/{id} get

Lookup a case file by ID.

get

#### get /plugin/casefile/byId/{id}

### URI Parameters

- id: required (integer)

  Numeric ID of the case file. Usually obtained by a previous list case files request.

## HTTP status code 200

Case file found.

### Body

Type: application/json

Example:

    {
              "id" : 4893,
              "caseNumber" : "20141118_4893",
              "caseType" : "Agricultural",
              "title" : "August 1914",
              "status" : "ACTIVE",
              "details" : "This case file is based on Complaint '20141024_2892'.<p/>Complaint '20141024_2892' had these details: <p/><strong>A book by Aleksandr Solzhenitsyn</strong>",
              "incidentDate" : null,
              "created" : "2014-11-18T13:09:29.250+0000",
              "creator" : "ebmillar",
              "modified" : "2014-11-18T13:09:29.928+0000",
              "modifier" : "ebmillar",
              "closed" : null,
              "disposition" : null,
              "priority" : "High",
              "participants" : [],
              "dueDate" : null,
              "approvers" : null,
              "ecmFolderPath" : null,
              "associationsFromObjects" : [{
                  "id" : 4900,
                  "person" : {
                    "id" : 2901,
                    "title" : "mr.",
                    "company" : null,
                    "status" : "ACTIVE",
                    "givenName" : "Witness first",
                    "familyName" : "Witness last",
                    "hairColor" : null,
                    "eyeColor" : null,
                    "heightInInches" : null,
                    "weightInPounds" : null,
                    "dateOfBirth" : null,
                    "dateMarried" : null,
                    "created" : "2014-10-24T23:14:24.342+0000",
                    "creator" : "anotherUser",
                    "modified" : "2014-11-18T13:09:29.929+0000",
                    "modifier" : "ebmillar",
                    "addresses" : [{
                        "id" : 2902,
                        "created" : "2014-10-24T23:14:24.345+0000",
                        "creator" : "anotherUser",
                        "modified" : "2014-11-18T13:03:13.882+0000",
                        "modifier" : "ecmillar",
                        "status" : "ACTIVE",
                        "type" : "type",
                        "types" : null,
                        "streetAddress" : "street address",
                        "streetAddress2" : "street address 2",
                        "city" : "city",
                        "state" : "state",
                        "zip" : "zip",
                        "country" : "country"
                      }
                    ],
                    "contactMethods" : [{
                        "id" : 2903,
                        "created" : "2014-10-24T23:14:24.347+0000",
                        "creator" : "anotherUser",
                        "modified" : "2014-11-18T13:03:13.882+0000",
                        "modifier" : "ecmillar",
                        "status" : "ACTIVE",
                        "type" : "contact type",
                        "types" : null,
                        "value" : "contact value"
                      }
                    ],
                    "securityTags" : [],
                    "personAliases" : [{
                        "id" : 2905,
                        "aliasType" : "Nick Name",
                        "aliasTypes" : null,
                        "aliasValue" : "Witness alias",
                        "created" : "2014-10-24T23:14:24.350+0000",
                        "creator" : "anotherUser",
                        "modified" : "2014-11-18T13:09:29.930+0000",
                        "modifier" : "ebmillar"
                      }
                    ],
                    "organizations" : [{
                        "organizationId" : 2904,
                        "organizationType" : "org type",
                        "organizationTypes" : null,
                        "organizationValue" : "org value",
                        "created" : "2014-10-24T23:14:24.349+0000",
                        "creator" : "anotherUser",
                        "modified" : "2014-11-18T13:03:13.876+0000",
                        "modifier" : "ecmillar"
                      }
                    ]
                  },
                  "parentId" : 4893,
                  "personType" : "Witness",
                  "parentType" : "CASE",
                  "personDescription" : "Witness Desc",
                  "created" : "2014-11-18T13:09:29.249+0000",
                  "creator" : "ebmillar",
                  "modified" : "2014-11-18T13:09:29.930+0000",
                  "modifier" : "ebmillar",
                  "notes" : null,
                  "tags" : ["Anonymous"]
                }, {
                  "id" : 4899,
                  "person" : {
                    "id" : 2894,
                    "title" : "mr.",
                    "company" : null,
                    "status" : "ACTIVE",
                    "givenName" : "Complaintant first",
                    "familyName" : "Complaintant last",
                    "hairColor" : null,
                    "eyeColor" : null,
                    "heightInInches" : null,
                    "weightInPounds" : null,
                    "dateOfBirth" : null,
                    "dateMarried" : null,
                    "created" : "2014-10-24T23:14:24.266+0000",
                    "creator" : "anotherUser",
                    "modified" : "2014-11-18T13:09:29.928+0000",
                    "modifier" : "ebmillar",
                    "addresses" : [{
                        "id" : 2895,
                        "created" : "2014-10-24T23:14:24.291+0000",
                        "creator" : "anotherUser",
                        "modified" : "2014-11-18T13:03:13.876+0000",
                        "modifier" : "ecmillar",
                        "status" : "ACTIVE",
                        "type" : "type",
                        "types" : null,
                        "streetAddress" : "street address",
                        "streetAddress2" : "street address 2",
                        "city" : "city",
                        "state" : "state",
                        "zip" : "zip",
                        "country" : "country"
                      }
                    ],
                    "contactMethods" : [{
                        "id" : 2896,
                        "created" : "2014-10-24T23:14:24.308+0000",
                        "creator" : "anotherUser",
                        "modified" : "2014-11-18T13:03:13.877+0000",
                        "modifier" : "ecmillar",
                        "status" : "ACTIVE",
                        "type" : "contact type",
                        "types" : null,
                        "value" : "contact value"
                      }
                    ],
                    "securityTags" : [],
                    "personAliases" : [{
                        "id" : 2898,
                        "aliasType" : "Nick Name",
                        "aliasTypes" : null,
                        "aliasValue" : "Complaintant alias",
                        "created" : "2014-10-24T23:14:24.326+0000",
                        "creator" : "anotherUser",
                        "modified" : "2014-11-18T13:09:29.931+0000",
                        "modifier" : "ebmillar"
                      }
                    ],
                    "organizations" : [{
                        "organizationId" : 2897,
                        "organizationType" : "org type",
                        "organizationTypes" : null,
                        "organizationValue" : "org value",
                        "created" : "2014-10-24T23:14:24.318+0000",
                        "creator" : "anotherUser",
                        "modified" : "2014-11-18T13:03:13.879+0000",
                        "modifier" : "ecmillar"
                      }
                    ]
                  },
                  "parentId" : 4893,
                  "personType" : "Complaintant",
                  "parentType" : "CASE",
                  "personDescription" : "Complaintant Desc",
                  "created" : "2014-11-18T13:09:29.249+0000",
                  "creator" : "ebmillar",
                  "modified" : "2014-11-18T13:09:29.928+0000",
                  "modifier" : "ebmillar",
                  "notes" : null,
                  "tags" : ["Anonymous"]
                }
              ],
              "originator" : null,
              "ecmFolderId" : "workspace://SpacesStore/d261b278-54ae-444a-88c3-5665f0c4e8c1",
              "childObjects" : [{
                  "associationId" : 4894,
                  "status" : "ACTIVE",
                  "parentName" : "20141118_4893",
                  "parentType" : "CASE",
                  "parentId" : 4893,
                  "targetName" : "20141024_2892",
                  "targetType" : "COMPLAINT",
                  "targetId" : 2892,
                  "created" : "2014-11-18T13:09:29.249+0000",
                  "creator" : "ebmillar",
                  "modified" : "2014-11-18T13:09:30.088+0000",
                  "modifier" : "ebmillar"
                }, {
                  "associationId" : 4897,
                  "status" : "ACTIVE",
                  "parentName" : "20141118_4893",
                  "parentType" : "CASE",
                  "parentId" : 4893,
                  "targetName" : "form_close_complaint_18112014080842251.xml",
                  "targetType" : "FILE",
                  "targetId" : 4889,
                  "created" : "2014-11-18T13:09:29.243+0000",
                  "creator" : "ebmillar",
                  "modified" : "2014-11-18T13:09:30.116+0000",
                  "modifier" : "ebmillar"
                }, {
                  "associationId" : 4895,
                  "status" : "ACTIVE",
                  "parentName" : "20141118_4893",
                  "parentType" : "CASE",
                  "parentId" : 4893,
                  "targetName" : "form_roi_18112014080731682.xml",
                  "targetType" : "FILE",
                  "targetId" : 4882,
                  "created" : "2014-11-18T13:09:29.248+0000",
                  "creator" : "ebmillar",
                  "modified" : "2014-11-18T13:09:30.099+0000",
                  "modifier" : "ebmillar"
                }, {
                  "associationId" : 4896,
                  "status" : "ACTIVE",
                  "parentName" : "20141118_4893",
                  "parentType" : "CASE",
                  "parentId" : 4893,
                  "targetName" : "Report_of_Investigation_18112014080734502.pdf",
                  "targetType" : "FILE",
                  "targetId" : 4884,
                  "created" : "2014-11-18T13:09:29.249+0000",
                  "creator" : "ebmillar",
                  "modified" : "2014-11-18T13:09:30.105+0000",
                  "modifier" : "ebmillar"
                }, {
                  "associationId" : 4898,
                  "status" : "ACTIVE",
                  "parentName" : "20141118_4893",
                  "parentType" : "CASE",
                  "parentId" : 4893,
                  "targetName" : "Close_Complaint_18112014080842880.pdf",
                  "targetType" : "FILE",
                  "targetId" : 4891,
                  "created" : "2014-11-18T13:09:29.248+0000",
                  "creator" : "ebmillar",
                  "modified" : "2014-11-18T13:09:30.118+0000",
                  "modifier" : "ebmillar"
                }
              ]
            }

#### /plugin/casefile/file post

Manage case files.

post

Add a file to the case. Submitted form must include a caseId element, and a files[] element with the files to be uploaded. Returns JSON suitable for consumption by the jQuery File Upload plugin.

#### post /plugin/casefile/file

Add a file to the case. Submitted form must include a caseId element, and a files[] element with the files to be uploaded. Returns JSON suitable for consumption by the jQuery File Upload plugin.

### Body

Type: multipart/form-data

Example:

    # send a standard multipart form request.

## HTTP status code 200

File(s) were successfully added.

### Body

Type: application/json

Example:

    {
              // NOTE: application/json is sent to all browsers EXCEPT Internet Explorer
              "files":[
                {
                  "name":"filename.txt",
                  "size":500,
                  "url":"/acm/link/to/download/filename.txt",
                  "thumbnailUrl":null,
                  "deleteUrl":"/acm/link/to/delete/filename.txt",
                  "deleteType":"DELETE",
                  "error":null
                }
              ]
            }

Type: text/plain

Example:

    {
              // NOTE: text/plain is sent ONLY to Internet Explorer.  Same format as application/json.
              "files":[
                {
                  "name":"filename.txt",
                  "size":500,
                  "url":"/acm/link/to/download/filename.txt",
                  "thumbnailUrl":null,
                  "deleteUrl":"/acm/link/to/delete/filename.txt",
                  "deleteType":"DELETE",
                  "error":null
                }
              ]
            }

#### /plugin/casefile/forUser/{user} get

get

Get the list of case files created by the given user.

#### get /plugin/casefile/forUser/{user}

Get the list of case files created by the given user.

### URI Parameters

- user: required (string)

  Case files created by this user will be included in the returned case file list.

## HTTP status code 200

### Body

Type: application/json

Example:

    [
              {
                "id" : 4491,
                "caseNumber" : "20141114_4491",
                "caseType" : "Agricultural",
                "title" : "complaint title",
                "status" : "ACTIVE",
                "details" : "This case file is based on Complaint '20141007_531'.",
                "incidentDate" : null,
                "created" : "2014-11-14T19:39:19.088+0000",
                "creator" : "ebmillar",
                "modified" : "2014-11-14T19:39:19.088+0000",
                "modifier" : "ebmillar",
                "closed" : null,
                "disposition" : null,
                "priority" : "High",
                "participants" : [],
                "dueDate" : null,
                "approvers" : null,
                "ecmFolderPath" : null,
                "associationsFromObjects" : [],
                "originator" : null,
                "ecmFolderId" : "workspace://SpacesStore/88286a52-f8e9-4c62-b894-98481733d44f",
                "childObjects" : [{
                    "associationId" : 4492,
                    "status" : "ACTIVE",
                    "parentName" : "20141114_4491",
                    "parentType" : "CASE",
                    "parentId" : 4491,
                    "targetName" : "20141007_531",
                    "targetType" : "COMPLAINT",
                    "targetId" : 531,
                    "created" : "2014-11-14T19:39:19.088+0000",
                    "creator" : "ebmillar",
                    "modified" : "2014-11-14T19:39:19.088+0000",
                    "modifier" : "ebmillar"
                  }
                ]
              }
            ]

#### /plugin/casebystatus

#### /plugin/casebystatus/summary get

get

Return a report of case file status counts for the last week, the last month, and the last year.

#### get /plugin/casebystatus/summary

Return a report of case file status counts for the last week, the last month, and the last year.

## HTTP status code 200

### Body

Type: application/json

Example:

    [
              {
                "timePeriod" : "one year",
                "caseByStatusDtoList" : [{
                    "status" : "CLOSED",
                    "count" : 1
                  }, {
                    "status" : "DRAFT",
                    "count" : 2
                  }, {
                    "status" : "ACTIVE",
                    "count" : 5
                  }
                ]
              },
              {
                "timePeriod" : "seven days",
                "caseByStatusDtoList" : [{
                    "status" : "ACTIVE",
                    "count" : 5
                  }
                ]
              },
              {
                "timePeriod" : "thirty days",
                "caseByStatusDtoList" : [{
                    "status" : "ACTIVE",
                    "count" : 5
                  }
                ]
              }
            ]

#### /plugin/casebystatus/{timePeriod} get

Get a list of case file status counts for a specific time period

get

#### get /plugin/casebystatus/{timePeriod}

### URI Parameters

- timePeriod: required (string)

  all, lastWeek, lastMonth, or lastYear.

## HTTP status code 200

### Body

Type: application/json

Example:

    [{
                "status" : "CLOSED",
                "count" : 1
              }, {
                "status" : "DRAFT",
                "count" : 2
              }, {
                "status" : "ACTIVE",
                "count" : 5
              }
            ]

#### /plugin/complaint post

post

Create a complaint based on the complaint originator's contact information

#### post /plugin/complaint

Create a complaint based on the complaint originator's contact information

### Body

Type: application/json

Example:

    {
         "complaintId": null,
         "complaintNumber": "20140806_193",
         "complaintType": "Agricultural",
         "priority": "Medium",
         "complaintTitle": "fire on the tree",
         "details": "Sample Detail",
         "incidentDate": "2014-09-19T04:00:00.000+0000",
         "status":"DRAFT",
         "originator": {
              "id": null,
              "personType": "Initiator",
              "personDescription": "Sample Description",
              "notes":"sample note describing the person",
              "tags": ["Grateful Dead", "Guitar" ],
              "person": {
                    "id": null,
                    "title": "Mr.",
                    "givenName": "John",
                    "familyName": "Doe",
                    "company": "Contoso",
                    "weightInPounds": 189,
                    "addresses": [{
                          "type": "home",
                          "streetAddress": "123 Main St.",
                          "streetAddress2": null,
                          "city": "Peoria",
                          "state": "IL",
                          "zip": "12345"
                       }],
                     "contactMethods": [{
                            "type": "Mobile Phone",
                            "value": "123-456-7890"
                              },
                              {
                            "type": "Personal E-mail",
                            "value": "john.doe@gmail.com"
                              }],
                    "securityTags": ["Anonymous",
                                   "Confidential",
                                   "Top Secret"],
                    "personAliases": [{
                         "id": null,
                          "aliasType": "Nick Name",
                          "aliasValue": "Nick"
                    }],
                    "organizations": [
                {
                "organizationId":null,
                "organizationType": "sample",
                "organizationValue": "tech net"
                      }
                ]
                  }
                },
            "associationsFromObjects": [{
              "id": null,
              "personType": "Subject",
              "personDescription": "Simple Description",
              "tags": ["Contoso", "Illinois" ],
              "person": {
                    "id": null,
                    "title": "Mr.",
                    "givenName": "John",
                    "familyName": "Doe",
                    "company": "Contoso",
                    "weightInPounds": 189,
                    "addresses": [{
                          "type": "home",
                          "streetAddress": "123 Main St.",
                          "streetAddress2": null,
                          "city": "Peoria",
                          "state": "IL",
                          "zip": "12345"
                       }],
                     "contactMethods": [{
                            "type": "Mobile Phone",
                            "value": "123-456-7890"
                              },
                              {
                            "type": "Personal E-mail",
                            "value": "john.doe@gmail.com"
                              }],
                    "securityTags": ["Anonymous",
                                   "Confidential",
                                   "Top Secret"],
                    "personAliases": [{
                         "id": null,
                          "aliasType": "Nick Name",
                          "aliasValue": "Nick"
                    }],
                    "organizations": [
                {
                "organizationId":null,
                "organizationType": "sample",
                "organizationValue": "tech net"
                      }
                ]
                  }
            }],
            "dueDate": "2014-09-22T04:00:00.000+0000",
            "tag": "no tag",
            "frequency": "low",
            "location": "1234 straight line St, fallschurch va"
        }

## HTTP status code 200

Normal response indicating the system created a new complaint

### Body

Type: application/json

Example:

    {
          "complaintId":2190,
          "complaintNumber":"20140806_1938",
          "complaintType":"Agricultural",
          "priority":"Medium",
          "complaintTitle":"fire on the tree",
          "details":"Sample Detail",
          "incidentDate":"2014-09-19T04:00:00.000+0000",
          "created":"2014-09-22T20:06:52.018+0000",
          "creator":"ann-acm",
          "modified":"2014-09-22T20:06:52.018+0000",
          "modifier":"ann-acm",
          "status":"DRAFT",
          "originator": {
                "id":2191,
                "parentId":2190,
                "tags": ["Grateful Dead", "Guitar" ],
                "person":{
                        "id":2192,
                        "title":"mr.",
                        "company":null,
                        "status":"ACTIVE",
                        "givenName":"Complaintant first",
                        "familyName":"Complaintant last",
                        "hairColor":null,
                        "eyeColor":null,
                        "heightInInches":null,
                        "weightInPounds":null,
                        "dateOfBirth":null,
                        "dateMarried":null,
                        "created":"2014-09-29T17:01:25.142+0000",
                        "creator":"anotherUser",
                        "modified":"2014-09-29T17:01:25.142+0000",
                        "modifier":"anotherUser",
                        "addresses":[],
                        "contactMethods":[],
                        "securityTags":[],
                        "personAliases":[ ],
                        "organizations":[]
                         },
                "personType":"Initiator",
                "parentType":"COMPLAINT",
                "personDescription":"Sample Description",
                "created":"2014-09-22T20:06:52.018+0000",
                "creator":"ann-acm",
                "modified":"2014-09-22T20:06:52.018+0000",
                "modifier":"ann-acm",
                "notes":"sample note describing the person"
          },
          "ecmFolderPath":"/Sites/acm/documentLibrary/Complaints/20140922_2190",
          "ecmFolderId":"workspace://SpacesStore/75ab1031-515a-4e82-ac58-fd9cf09e7119",
          "childObjects": [],
          "approvers": null,
          "associationsFromObjects": [{
                "id":2194,
                "parentId":2190,
                "tags": ["Armedia", "Allman Brothers Band" ],
                "person": {
                          "id":2193,
                          "title":"Mr.",
                          "company":"Armedia",
                          "status":"ACTIVE",
                          "givenName":"Johnatan",
                          "familyName":"Joe",
                          "hairColor":"black",
                          "eyeColor":null,
                          "heightInInches":null,
                          "weightInPounds":189,
                          "dateOfBirth":null,
                          "dateMarried":null,
                          "created":"2014-09-29T19:08:06.006+0000",
                          "creator":"ann-acm",
                          "modified":"2014-09-29T19:08:06.006+0000",
                          "modifier":"ann-acm",
                          "addresses":[],
                          "contactMethods":[],
                          "securityTags":[],
                          "personAliases":[ ],
                          "organizations":[]
                           },
                "personType": "Subject",
                "parentType": "COMPLAINT",
                "personDescription": "Simple Description",
                "created": "2014-09-02T18:09:49.140+0000",
                "creator": "ann-acm",
                "modified": "2014-09-02T18:09:49.141+0000",
                "modifier": "ann-acm"
              }],
        "dueDate":"2014-09-22T04:00:00.000+0000",
        "tag":"no tag",
        "frequency":"low",
        "location":"1234 straight line St, fallschurch va"
        }

## HTTP status code 400

Usually means the request body was invalid (did not match the expected JSON format). The response body will be empty.

#### /plugin/complaint/types get

Manage the list of complaint types.

get

Retrieve array of valid complaint types.

#### get /plugin/complaint/types

Retrieve array of valid complaint types.

## HTTP status code 200

Expected response including the valid complaint types.

### Body

Type: application/json

Example:

    [ "Domestic Dispute", "Arson", "Better Business Dispute", "Government", "Local", "Agricultural", "Pollution" ]

#### /plugin/complaint/priorities get

Manage the list of complaint priorities.

get

Retrieve array of valid complaint priorities.

#### get /plugin/complaint/priorities

Retrieve array of valid complaint priorities.

## HTTP status code 200

Expected response including the valid complaint priorities.

### Body

Type: application/json

Example:

    [ "Low", "Medium", "High" ]

#### /plugin/complaint/file post

Manage complaint files.

post

Add a file to the complaint. Submitted form must include a complaintId element, and a file[] element with the files to be uploaded. Returns JSON suitable for consumption by the jQuery File Upload plugin.

#### post /plugin/complaint/file

Add a file to the complaint. Submitted form must include a complaintId element, and a file[] element with the files to be uploaded. Returns JSON suitable for consumption by the jQuery File Upload plugin.

### Body

Type: multipart/form-data

#### /plugin/complaint/byId/{complaintId} get

get

Lookup complaint details by complaint ID.

#### get /plugin/complaint/byId/{complaintId}

Lookup complaint details by complaint ID.

### URI Parameters

- complaintId: required (string)

## HTTP status code 200

expected response containing the desired complaint details

### Body

Type: application/json

Example:

    {
             "complaintId": 2190,
             "complaintNumber": "20140806_1938",
             "complaintType": "Agricultural",
             "priority": "Medium",
             "complaintTitle": "falling fire is coming  tree",
             "details": "Sample Detail",
             "incidentDate": "2014-09-19T04:00:00.000+0000",
             "created": "2014-09-29T21:34:54.947+0000",
             "creator": "ann-acm",
             "modified": "2014-09-29T21:34:54.947+0000",
             "modifier": "ann-acm",
             "status": "DRAFT",
             "originator": {
                   "id": 2191,
                   "tags": ["Grateful Dead", "Guitar" ],
                   "person": {
                       "id": 2192,
                       "title": null,
                       "company": null,
                       "status": "ACTIVE",
                       "givenName": null,
                       "familyName": null,
                       "hairColor": null,
                       "eyeColor": null,
                       "heightInInches": null,
                       "weightInPounds": null,
                       "dateOfBirth": null,
                       "dateMarried": null,
                       "created": "2014-09-22T20:06:52.021+0000",
                       "creator": "ann-acm",
                       "modified": "2014-09-22T20:06:52.021+0000",
                       "modifier": "ann-acm",
                       "addresses": [{
                           "id" : 1294,
                           "created" : "2014-10-15T13:47:41.313+0000",
                           "creator" : "anotherUser",
                           "modified" : "2014-10-15T18:22:03.648+0000",
                           "modifier" : "ebmillar",
                           "status" : "ACTIVE",
                           "type" : "type",
                           "types" : null,
                           "streetAddress" : "street address",
                           "streetAddress2" : "street address 2",
                           "city" : "city",
                           "state" : "state",
                           "zip" : "zip",
                           "country" : "country"
                         }
                       ],
                       "contactMethods": [{
                           "id" : 1295,
                           "created" : "2014-10-15T13:47:41.329+0000",
                           "creator" : "anotherUser",
                           "modified" : "2014-10-17T13:48:47.960+0000",
                           "modifier" : "ebmillar",
                           "status" : "ACTIVE",
                           "type" : "Office phone",
                           "types" : null,
                           "value" : "703-555-1212"
                         }
                       ],
                       "securityTags": [],
                       "personAliases": [{
                           "id" : 1297,
                           "aliasType" : "Nick Name",
                           "aliasTypes" : null,
                           "aliasValue" : "Complaintant alias",
                           "created" : "2014-10-15T13:47:41.347+0000",
                           "creator" : "anotherUser",
                           "modified" : "2014-10-15T18:22:03.674+0000",
                           "modifier" : "ebmillar"
                         }
                       ],
                       "organizations": [{
                         "organizationId" : 1296,
                         "organizationType" : "org type",
                         "organizationTypes" : null,
                         "organizationValue" : "org value",
                         "created" : "2014-10-15T13:47:41.338+0000",
                         "creator" : "anotherUser",
                         "modified" : "2014-10-15T18:22:03.670+0000",
                         "modifier" : "ebmillar"
                       }
                     ]
                   },
                   "parentId": 2190,
                   "personType": "Initiator",
                   "parentType": "COMPLAINT",
                   "personDescription": "Sample Description",
                   "created": "2014-09-22T20:06:52.018+0000",
                   "creator": "ann-acm",
                   "modified": "2014-09-29T21:34:54.971+0000",
                   "modifier": "ann-acm",
                   "notes": "sample note describing the person"
             },
             "ecmFolderPath": null,
             "ecmFolderId": "workspace://SpacesStore/75ab1031-515a-4e82-ac58-fd9cf09e7119",
             "childObjects": [],
             "approvers": null,
             "associationsFromObjects": [{
                   "id": 2191,
                   "tags": ["Grateful Dead", "Guitar" ],
                   "person": {
                     "id": 2192,
                     "title": null,
                     "company": null,
                     "status": "ACTIVE",
                     "givenName": null,
                     "familyName": null,
                     "hairColor": null,
                     "eyeColor": null,
                     "heightInInches": null,
                     "weightInPounds": null,
                     "dateOfBirth": null,
                     "dateMarried": null,
                     "created": "2014-09-22T20:06:52.021+0000",
                     "creator": "ann-acm",
                     "modified": "2014-09-22T20:06:52.021+0000",
                     "modifier": "ann-acm",
                     "addresses": [],
                     "contactMethods": [],
                     "securityTags": [],
                     "personAliases": [],
                     "organizations": []
                   },
                   "parentId": 2190,
                   "personType": "Initiator",
                   "parentType": "COMPLAINT",
                   "personDescription": "Sample Description",
                   "created": "2014-09-22T20:06:52.018+0000",
                   "creator": "ann-acm",
                   "modified": "2014-09-29T21:34:54.971+0000",
                   "modifier": "ann-acm",
                   "notes": "sample note describing the person"
                 },
                 {
                   "id": 2194,
                   "person": {
                     "id": 2193,
                     "title": null,
                     "company": null,
                     "status": "ACTIVE",
                     "givenName": null,
                     "familyName": null,
                     "hairColor": null,
                     "eyeColor": null,
                     "heightInInches": null,
                     "weightInPounds": null,
                     "dateOfBirth": null,
                     "dateMarried": null,
                     "created": "2014-09-22T20:06:52.023+0000",
                     "creator": "ann-acm",
                     "modified": "2014-09-22T20:06:52.023+0000",
                     "modifier": "ann-acm",
                     "addresses": [],
                     "contactMethods": [],
                     "securityTags": [],
                     "personAliases": [],
                     "organizations": []
                   },
                   "parentId": 2190,
                   "personType": "Subject",
                   "parentType": "COMPLAINT",
                   "personDescription": "Simple Description",
                   "created": "2014-09-22T20:06:52.018+0000",
                   "creator": "ann-acm",
                   "modified": "2014-09-22T20:06:52.018+0000",
                   "modifier": "ann-acm",
                   "notes": null
                 }],
             "participants" : [{
                 "id" : 436,
                 "objectType" : "COMPLAINT",
                 "objectId" : 158,
                 "participantType" : "assignee",
                 "participantLdapId" : "ecmillar",
                 "created" : "2014-10-02T20:56:50.482+0000",
                 "creator" : "ecmillar",
                 "modified" : "2014-10-23T19:19:07.804+0000",
                 "modifier" : "ebmillar"
               }
             ],
             "dueDate": "2014-09-22T04:00:00.000+0000",
             "tag": "no tag",
             "frequency": "low",
             "location": "1234 straight line St, fallschurch va"
             }

## HTTP status code 400

Usually means the requested complaint does not exist.

### Body

Type: text/plain

Example:

    Complaint ID 2045 not found.

#### /plugin/person post

post

Create a person with all details

#### post /plugin/person

Create a person with all details

### Body

Type: application/json

Example:

    {
            "id": 1884,
            "title": "Mr.",
            "givenName": "John",
            "familyName": "Doe",
            "company": "Armedia",
            "hairColor":"white",
            "eyeColor":"gray",
            "heightInInches":1.9,
            "weightInPounds":180,
            "dateOfBirth":null,
            "dateMarried":null,
            "addresses": [{
              "type": "home",
              "streetAddress": "123 Main St.",
              "streetAddress2": null,
              "city": "Peoria",
              "state": "IL",
              "zip": "12345"
            }],
            "contactMethods": [{
              "type": "Mobile Phone",
              "value": "123-456-7890"
            },
            {
              "type": "Personal E-mail",
              "value": "john.doe@gmail.com"
            }],
            "securityTags": ["Anonymous",
            "Confidential",
            "Top Secret"],
            "personAliases": [{
              "id": null,
              "aliasType": "Nick Name",
              "aliasValue": "Nick"
            }],
            "organizations": [{
              "organizationId": null,
              "organizationType": "sample",
              "organizationValue": "tech net"
            }]
        }

## HTTP status code 200

Normal response indicating the system created a new person

### Body

Type: application/json

Example:

    {
          "id":1884,
          "title":"Mr.",
          "company":"Armedia",
          "status":null,
          "givenName":"John",
          "familyName":"Doe",
          "hairColor":"white",
          "eyeColor":"gray",
          "heightInInches":1,
          "weightInPounds":180,
          "dateOfBirth":null,
          "dateMarried":null,
          "created":null,
          "creator":"ann-acm",
          "modified":"2014-09-23T19:27:53.466+0000",
          "modifier":"ann-acm",
          "addresses":[
              {
                "id":2283,
                "created":"2014-09-23T19:27:53.319+0000",
                "creator":"ann-acm",
                "modified":"2014-09-23T19:27:53.319+0000",
                "modifier":"ann-acm",
                "status":"ACTIVE",
                "type":"home",
                "types":null,
                "streetAddress":"123 Main St.",
                "streetAddress2":null,
                "city":"Peoria",
                "state":"IL",
                "zip":"12345",
                "country":null
                }
                ],
          "contactMethods":[
            {
              "id":2284,
              "created":"2014-09-23T19:27:53.322+0000",
              "creator":"ann-acm",
              "modified":"2014-09-23T19:27:53.322+0000",
              "modifier":"ann-acm",
              "status":"ACTIVE",
              "type":"Mobile Phone",
              "types":null,
              "value":"123-456-7890"
              },
              {
              "id":2285,
              "created":"2014-09-23T19:27:53.435+0000",
              "creator":"ann-acm",
              "modified":"2014-09-23T19:27:53.435+0000",
              "modifier":"ann-acm",
              "status":"ACTIVE",
              "type":"Personal E-mail",
              "types":null,
              "value":"john.doe@gmail.com"
              }
              ],
          "securityTags":[
              "Anonymous",
              "Confidential",
              "Top Secret"
              ],
          "personAliases":[
              {
              "id":2287,
              "aliasType":"Nick Name",
              "aliasTypes":null,
              "aliasValue":"Nick",
              "created":"2014-09-23T19:27:53.448+0000",
              "creator":"ann-acm",
              "modified":"2014-09-23T19:27:53.448+0000",
              "modifier":"ann-acm"
              }
              ],
          "organizations":[
              {
              "organizationId":2286,
              "organizationType":"sample",
              "organizationTypes":null,
              "organizationValue":"tech net",
              "created":"2014-09-23T19:27:53.442+0000",
              "creator":"ann-acm",
              "modified":"2014-09-23T19:27:53.442+0000",
              "modifier":"ann-acm"
              }
              ]
          }

## HTTP status code 400

Usually means the request body was invalid (did not match the expected JSON format). The response body will be empty.

#### /plugin/person/types get

Manage the list of person types.

get

Retrieve array of valid person types.

#### get /plugin/person/types

Retrieve array of valid person types.

## HTTP status code 200

Expected response including the valid person types.

### Body

Type: application/json

Example:

    [
               "Subject",
               "Witness",
               "SpouseCohab",
               "Complaintant",
               "Initiator",
               "Wrongdoer"
            ]

#### /plugin/person/find?assocId get

get

Retrieve a person using personAssociation Id. pass assocId=2046 as a parameter

#### get /plugin/person/find?assocId

Retrieve a person using personAssociation Id. pass assocId=2046 as a parameter

## HTTP status code 200

### Body

Type: application/json

Example:

    {
                "id":2051,
                "title":"mr",
                "company":null,
                "status":"ACTIVE",
                "givenName":"king",
                "familyName":"gregory",
                "hairColor":null,
                "eyeColor":null,
                "heightInInches":null,
                "weightInPounds":null,
                "dateOfBirth":null,
                "dateMarried":null,
                "created":"2014-09-19T12:33:53.926+0000",
                "creator":"ann-acm",
                "modified":"2014-09-19T12:33:53.926+0000",
                "modifier":"ann-acm",
                "addresses":[
                    {
                      "id":2047,
                      "created":"2014-09-19T04:00:00.000+0000",
                      "creator":"Ann Administrator",
                      "modified":"2014-09-19T12:33:53.853+0000",
                      "modifier":"ann-acm",
                      "status":"ACTIVE",
                      "type":"Business",
                      "types":null,
                      "streetAddress":"90155 courthouse",
                      "streetAddress2":null,
                      "city":"vienna",
                      "state":"va",
                      "zip":null,
                      "country":null
                    }],
                "contactMethods":[
                    {
                      "id":2048,
                      "created":"2014-09-19T04:00:00.000+0000",
                      "creator":"Ann Administrator",
                      "modified":"2014-09-19T12:33:53.902+0000",
                      "modifier":"ann-acm",
                      "status":"ACTIVE",
                      "type":"Home phone",
                      "types":null,
                      "value":"5555555555"
                    }],
                "securityTags":[
                ],
                "personAliases":[
                    {
                      "id":2050,
                      "aliasType":"Married",
                      "aliasTypes":null,
                      "aliasValue":"king",
                      "created":"2014-09-19T04:00:00.000+0000",
                      "creator":"Ann Administrator",
                      "modified":"2014-09-19T12:33:53.915+0000",
                      "modifier":"ann-acm"
                    }],
                "organizations":[
                     {
                      "organizationId":2049,
                      "organizationType":"Government",
                      "organizationTypes":null,
                      "organizationValue":"<>br<>",
                      "created":"2014-09-19T04:00:00.000+0000",
                      "creator":"Ann Administrator",
                      "modified":"2014-09-19T12:33:53.909+0000",
                      "modifier":"ann-acm"
                   }]

            }

## HTTP status code 400

Usually means the requested person does not exist.

### Body

Type: text/plain

Example:

    PersonAssociation ID 2046 not found.

#### /plugin/person/list/{parentType}/{parentId} get

get

Retrieve a person using parentType and parentId in the personAssociation

#### get /plugin/person/list/{parentType}/{parentId}

Retrieve a person using parentType and parentId in the personAssociation

### URI Parameters

- parentType: required (string)
- parentId: required (string)

## HTTP status code 200

### Body

Type: application/json

Example:

    {
              "id":2051,
              "title":"mr",
              "company":null,
              "status":"ACTIVE",
              "givenName":"richard",
              "familyName":"mao",
              "hairColor":null,
              "eyeColor":null,
              "heightInInches":null,
              "weightInPounds":null,
              "dateOfBirth":null,
              "dateMarried":null,
              "created":"2014-09-19T12:33:53.926+0000",
              "creator":"ann-acm",
              "modified":"2014-09-19T12:33:53.926+0000",
              "modifier":"ann-acm",
              "addresses":[
                    {
                        "id":2047,
                        "created":"2014-09-19T04:00:00.000+0000",
                        "creator":"Ann Administrator",
                        "modified":"2014-09-19T12:33:53.853+0000",
                        "modifier":"ann-acm",
                        "status":"ACTIVE",
                        "type":"Business",
                        "types":null,
                        "streetAddress":"90155 courthouse",
                        "streetAddress2":null,
                        "city":"vienna",
                        "state":"va",
                        "zip":null,
                        "country":null
                    }],
              "contactMethods":[
                    {
                        "id":2048,
                        "created":"2014-09-19T04:00:00.000+0000",
                        "creator":"Ann Administrator",
                        "modified":"2014-09-19T12:33:53.902+0000",
                        "modifier":"ann-acm",
                        "status":"ACTIVE",
                        "type":"Home phone",
                        "types":null,
                        "value":"5555555555"
                    }],
              "securityTags":[
              ],
              "personAliases":[
                    {
                        "id":2050,
                        "aliasType":"Married",
                        "aliasTypes":null,
                        "aliasValue":"king",
                        "created":"2014-09-19T04:00:00.000+0000",
                        "creator":"Ann Administrator",
                        "modified":"2014-09-19T12:33:53.915+0000",
                        "modifier":"ann-acm"
                    }],
              "organizations":[
                    {
                        "organizationId":2049,
                        "organizationType":"Government",
                        "organizationTypes":null,
                        "organizationValue":"Sample org value",
                        "created":"2014-09-19T04:00:00.000+0000",
                        "creator":"Ann Administrator",
                        "modified":"2014-09-19T12:33:53.909+0000",
                        "modifier":"ann-acm"
                    }
                    ]
              },
              {
              "id":2056,
              "title":"mr",
              "company":null,
              "status":"ACTIVE",
              "givenName":"tim ",
              "familyName":"howard ",
              "hairColor":null,
              "eyeColor":null,
              "heightInInches":null,
              "weightInPounds":null,
              "dateOfBirth":null,
              "dateMarried":null,
              "created":"2014-09-19T12:33:53.968+0000",
              "creator":"ann-acm",
              "modified":"2014-09-19T12:33:53.968+0000",
              "modifier":"ann-acm",
              "addresses":[
                    {
                        "id":2052,
                        "created":"2014-09-19T04:00:00.000+0000",
                        "creator":"Ann Administrator",
                        "modified":"2014-09-19T12:33:53.957+0000",
                        "modifier":"ann-acm",
                        "status":"ACTIVE",
                        "type":"Home",
                        "types":null,
                        "streetAddress":"2563 comeandgetit rd ",
                        "streetAddress2":null,
                        "city":"Alexandria",
                        "state":"va",
                        "zip":null,
                        "country":null
                    }],
              "contactMethods":[
                    {
                        "id":2053,
                        "created":"2014-09-19T04:00:00.000+0000",
                        "creator":"Ann Administrator",
                        "modified":"2014-09-19T12:33:53.959+0000",
                        "modifier":"ann-acm",
                        "status":"ACTIVE",
                        "type":"Home phone",
                        "types":null,
                        "value":"4444444444"
                    }],
              "securityTags":[
              ],
              "personAliases":[
                    {
                        "id":2055,
                        "aliasType":"Married",
                        "aliasTypes":null,
                        "aliasValue":"kingofkings",
                        "created":"2014-09-19T04:00:00.000+0000",
                        "creator":"Ann Administrator",
                        "modified":"2014-09-19T12:33:53.964+0000",
                        "modifier":"ann-acm"
                    }],
              "organizations":[
                    {
                        "organizationId":2054,
                        "organizationType":"Non-profit",
                        "organizationTypes":null,
                        "organizationValue":"billboard",
                        "created":"2014-09-19T04:00:00.000+0000",
                        "creator":"Ann Administrator",
                        "modified":"2014-09-19T12:33:53.962+0000",
                        "modifier":"ann-acm"
                    }]
              }

## HTTP status code 400

Usually means the requested person /persons does not exist.

### Body

Type: text/plain

Example:

    PersonAssociation  PARENTID OR PARENTTYPE are not found.

#### /plugin/person/delete/{personId} delete

delete

Delete a person by personId

#### delete /plugin/person/delete/{personId}

Delete a person by personId

### URI Parameters

- personId: required (string)

## HTTP status code 200

### Body

Type: application/json

Example:

     Deleting a person is successful

## HTTP status code 400

Usually means the requested person does not exist.

### Body

Type: text/plain

Example:

    person with Id 2046 not found.

#### /plugin/personAssociation post

post

Create a personAssociation with all details

#### post /plugin/personAssociation

Create a personAssociation with all details

### Body

Type: application/json

Example:

    {
        "id": null,
        "personType": "Subject",
        "parentId":3022,
        "parentType":"COMPLAINT",
        "personDescription": "Sample Description",
        "notes":"sample note describing the person",
        "tags": ["Grateful Dead", "Guitar" ],
        "person": {
              "id": null,
              "title": "Mr.",
              "givenName": "John",
              "familyName": "Doe",
              "company": "Contoso",
              "weightInPounds": 189,
              "addresses": [{
                    "type": "home",
                    "streetAddress": "123 Main St.",
                    "streetAddress2": null,
                    "city": "Peoria",
                    "state": "IL",
                    "zip": "12345"
                 }],
               "contactMethods": [{
                      "type": "Mobile Phone",
                      "value": "123-456-7890"
                        },
                        {
                      "type": "Personal E-mail",
                      "value": "john.doe@gmail.com"
                        }],
              "securityTags": ["Anonymous",
                             "Confidential",
                             "Top Secret"],
              "personAliases": [{
                   "id": null,
                    "aliasType": "Nick Name",
                    "aliasValue": "Nick"
              }],
              "organizations": [
          {
          "organizationId":null,
          "organizationType": "sample",
          "organizationValue": "tech net"
                }
          ]
            }
          }

        }

## HTTP status code 200

Normal response indicating the system created a new personAssociation

### Body

Type: application/json

Example:

    {
        "id":3311,
        "tags": ["Grateful Dead", "Guitar" ],
        "person":{
              "id":3317,
              "title":"Mr.",
              "company":"Contoso",
              "status":"ACTIVE",
              "givenName":"John",
              "familyName":"Doe",
              "hairColor":null,
              "eyeColor":null,
              "heightInInches":null,
              "weightInPounds":189,
              "dateOfBirth":null,
              "dateMarried":null,
              "created":"2014-09-29T21:53:57.735+0000",
              "creator":"ann-acm",
              "modified":"2014-09-29T21:53:57.735+0000",
              "modifier":"ann-acm",
              "addresses":[
                        {
                        "id":3312,
                        "created":"2014-09-29T21:53:57.725+0000",
                        "creator":"ann-acm",
                        "modified":"2014-09-29T21:53:57.725+0000",
                        "modifier":"ann-acm",
                        "status":"ACTIVE",
                        "type":"home",
                        "types":null,
                        "streetAddress":"123 Main St.",
                        "streetAddress2":null,
                        "city":"Peoria",
                        "state":"IL",
                        "zip":"12345",
                        "country":null
                        }
                       ],
              "contactMethods":[
                        {
                        "id":3313,
                        "created":"2014-09-29T21:53:57.727+0000",
                        "creator":"ann-acm",
                        "modified":"2014-09-29T21:53:57.727+0000",
                        "modifier":"ann-acm",
                        "status":"ACTIVE",
                        "type":"Mobile Phone",
                        "types":null,
                        "value":"123-456-7890"
                        },
                        {
                        "id":3314,
                        "created":"2014-09-29T21:53:57.729+0000",
                        "creator":"ann-acm",
                        "modified":"2014-09-29T21:53:57.729+0000",
                        "modifier":"ann-acm",
                        "status":"ACTIVE",
                        "type":"Personal E-mail",
                        "types":null,
                        "value":"john.doe@gmail.com"
                        }
                        ],
                        "securityTags":[
                        "Anonymous",
                        "Confidential",
                        "Top Secret"
                        ],
              "personAliases":[
                        {
                        "id":3316,
                        "aliasType":"Nick Name",
                        "aliasTypes":null,
                        "aliasValue":"Nick",
                        "created":"2014-09-29T21:53:57.733+0000",
                        "creator":"ann-acm",
                        "modified":"2014-09-29T21:53:57.733+0000",
                        "modifier":"ann-acm"
                        }
                        ],
              "organizations":[
                        {
                        "organizationId":3315,
                        "organizationType":"sample",
                        "organizationTypes":null,
                        "organizationValue":"tech net",
                        "created":"2014-09-29T21:53:57.731+0000",
                        "creator":"ann-acm",
                        "modified":"2014-09-29T21:53:57.731+0000",
                        "modifier":"ann-acm"
                        }]
              },
        "parentId":3022,
        "personType":"Subject",
        "parentType":"COMPLAINT",
        "personDescription":"Sample Description",
        "created":"2014-09-29T21:53:57.720+0000",
        "creator":"ann-acm",
        "modified":"2014-09-29T21:53:57.720+0000",
        "modifier":"ann-acm",
        "notes":"sample note describing the person"
         }

## HTTP status code 400

Usually means the request body was invalid (did not match the expected JSON format). The response body will be empty.

#### /plugin/profile

#### /plugin/profile/get/{userId} get

get

Get a user profile (User and Company) information's

#### get /plugin/profile/get/{userId}

Get a user profile (User and Company) information's

### URI Parameters

- userId: required (string)

  User login name of the user whose profile is desired.

## HTTP status code 200

### Body

Type: application/json

Example:

    {
              "userId":"ann-acm",
              "companyName":"Armedia",
              "firstAddress":"1234 Some Name",
              "secondAddress":"Suite 123",
              "mainOfficePhone":"111-111-1111",
              "fax":"555-555-5555",
              "city":"Vienna",
              "state":"VA",
              "zip":"12345",
              "website":"www.armedia.com",
              "location":"Pentagon",
              "imAccount":"DMiler",
              "imSystem":"Skype",
              "officePhoneNumber":"555-555-5555",
              "mobilePhoneNumber":"555-555-5555",
              "fullName":"Ann Administrator",
              "email":"acm@armedia.com",
              "pictureUrl":"",
              "groups":["ACM_ADMINISTRATOR_DEV"]
            }

#### /plugin/profile/userOrgInfo

#### /plugin/profile/userOrgInfo/set post

post

Update the user profile data (for the User and for the Company)

#### post /plugin/profile/userOrgInfo/set

Update the user profile data (for the User and for the Company)

### Body

Type: application/json

Example:

    {
                 "userId":"ann-acm",
                 "companyName":"Armedia TEST",
                 "firstAddress":"1234 NEW NAME",
                 "secondAddress":"Suite 1234",
                 "mainOfficePhone":"111-111-1111",
                 "fax":"555-555-5555",
                 "city":"Vienna",
                 "state":"VA",
                 "zip":"12345",
                 "website":"www.armedia.org",
                 "location":"Pentagon",
                 "imAccount":"DMiler",
                 "imSystem":"Skype",
                 "officePhoneNumber":"555-555-5555",
                 "mobilePhoneNumber":"555-555-5555",
                 "fullName":"Ann Administrator",
                 "email":"acm@armedia.com",
                 "pictureUrl":"",
                 "groups":["ACM_ADMINISTRATOR_DEV"]
                }

## HTTP status code 200

The same data that was sent for update in the POST.

### Body

Type: application/json

Example:

    {
                  "userId":"ann-acm",
                  "companyName":"Armedia TEST",
                  "firstAddress":"1234 NEW NAME",
                  "secondAddress":"Suite 1234",
                  "mainOfficePhone":"111-111-1111",
                  "fax":"555-555-5555",
                  "city":"Vienna",
                  "state":"VA",
                  "zip":"12345",
                  "website":"www.armedia.org",
                  "location":"Pentagon",
                  "imAccount":"DMiler",
                  "imSystem":"Skype",
                  "officePhoneNumber":"555-555-5555",
                  "mobilePhoneNumber":"555-555-5555",
                  "fullName":"Ann Administrator",
                  "email":"acm@armedia.com",
                  "pictureUrl":"",
                  "groups":["ACM_ADMINISTRATOR_DEV"]
                 }

#### /plugin/dataaccess

#### /plugin/dataaccess/accessControlDefaults get

get

Get a page of the default access controls.

#### get /plugin/dataaccess/accessControlDefaults

Get a page of the default access controls.

### Query Parameters

- s (string)

  A property to sort by. Must be one of the properties shown in the resultPage of the example response. Multiple values are allowed.

- start (integer)

  index of the first row to be returned. The first page starts at row 0.

- n (integer)

  maximum rows to be returned.

## HTTP status code 200

Normal response. Includes integers for totalCount, startRow, and maxRows, and an array of default ACL objects.

### Body

Type: application/json

Example:

    {
              "totalCount" : 98,    // total number of default access controls
              "startRow" : 0,       // start row (from the request)
              "maxRows" : 1,        // max rows (from the request)
              "resultPage" : [{     // array of default access control objects
                  "id" : 1861,      // default access ID
                  "objectType" : "Complaint",                     // type of the object to be protected
                  "objectState" : "DRAFT",                        // object state this default access applies to
                  "accessLevel" : "Add Document",                 // the action protected by this default access
                  "accessorType" : "Complaint Group",             // the type of participant to whom this access applies
                  "accessDecision" : "GRANT",                     // whether access is permitted (GRANT, DENY, MANDATORY_GRANT, MANDATORY_DENY)
                  "allowDiscretionaryUpdate" : true,              // whether this access can be updated at runtime for any given object
                  "created" : "2014-07-09T18:03:16.826+0000",     // when the default access was created
                  "creator" : "ACL_SYSTEM_USER",                  // user id that created the access
                  "modified" : "2014-07-09T18:03:16.826+0000",    // when the default access was last modified
                  "modifier" : "ACL_SYSTEM_USER"                  // user id that modified the default access
                }
              ]
            }

## HTTP status code 403

The user is not authorized to view the default access controls.

## HTTP status code 500

Somehow the server was not able to deliver the requested default access controls.

### Body

Type: text/plain

Example:

    Some error text will be returned.

#### /plugin/dataaccess/default/{defaultAccessId} post

post

Update the default access control with ID = the given defaultAccessId. Only the accessDecision and the allowDiscretionaryUpdate flag can be changed. The other fields are read-only. accessDecision can be GRANT, DENY, MANDATORY_GRANT, or MANDATORY_DENY.

#### post /plugin/dataaccess/default/{defaultAccessId}

Update the default access control with ID = the given defaultAccessId. Only the accessDecision and the allowDiscretionaryUpdate flag can be changed. The other fields are read-only. accessDecision can be GRANT, DENY, MANDATORY_GRANT, or MANDATORY_DENY.

### URI Parameters

- defaultAccessId: required (string)

### Body

Type: application/json

Example:

    {
              "id" : 500,
              "objectType" : "Complaint",
              "objectState" : "DRAFT",
              "accessLevel" : "update",
              "accessorType" : "Supervisor",
              "accessDecision" : "GRANT",
              "allowDiscretionaryUpdate" : true,
            }

## HTTP status code 200

The default access control rule was updated successfully.

### Body

Type: application/json

Example:

    {
              "id" : 500,
              "objectType" : "type",
              "objectState" : "state",
              "accessLevel" : "accessLevel",
              "accessorType" : "accessor",
              "accessDecision" : "GRANT",
              "allowDiscretionaryUpdate" : true,
              "created" : "2014-06-03T21:16:56.090+0000",
              "creator" : "creator",
              "modified" : "2014-07-24T21:16:56.090+0000",
              "modifier" : "modifier"
            }

## HTTP status code 400

The requested default access control rule does not exist.

### Body

Type: text/plain

Example:

    Could not update default access with ID = 500.
            Server encountered exception: Default access with id '500' does not exist.
            Exception type was: 'com.armedia.acm.core.exceptions.AcmUserActionFailedException'.

#### /plugin/task

#### /plugin/task/forUser/{user} get

get

Get a list of active tasks for the specified user.

#### get /plugin/task/forUser/{user}

Get a list of active tasks for the specified user.

### URI Parameters

- user: required (string)

## HTTP status code 200

expected response containing a list of tasks.

### Body

Type: application/json

Example:

    [
              {
                "taskId":500,
                "priority":0,
                "title":"Example Task Title",
                "dueDate":"2014-06-03",
                "attachedToObjectType":"COMPLAINT",
                "attachedToObjectId":495,
                "assignee":"ann-acm",
                "businessProcessName":"cmComplaintWorkflow",
                "adhocTask":false
              }
             ]

#### /plugin/task/completeTask/{taskId} post

post

Complete a task. Must be called by the task's current assignee.

#### post /plugin/task/completeTask/{taskId}

Complete a task. Must be called by the task's current assignee.

### URI Parameters

- taskId: required (string)

## HTTP status code 200

Task was successfully completed. JSON represents the historical task instance, with information as to when the task was started and completed.

### Body

Type: application/json

Example:

    {
            "taskId":500,
            "priority":50,
            "title":"The Task Title",
            "dueDate":"2014-06-03",
            "attachedToObjectType":"COMPLAINT",
            "attachedToObjectId":250,
            "assignee":"ann-acm",
            "businessProcessName":"Complaint Approval",
            "adhocTask":false,
            "completed":true,
            "taskStartDate":"2014-06-02",
            "taskFinishedDate":"2014-06-03",
            "taskDurationInMillis":298392
            }

## HTTP status code 400

The task could not be completed. Either the task ID does not represent an active task (task does not exist or is already closed), or the authenticated user is not the task assignee. T

### Body

Type: text/plain

Example:

    Task '500' does not exist or has already been completed.

#### /plugin/task/adHocTask post

post

Create a standalone task (not tied to a workflow or business process)

#### post /plugin/task/adHocTask

Create a standalone task (not tied to a workflow or business process)

### Body

Type: application/json

Example:

    {
              "priority" : "Low",  // can be Low, Medium, High, Expedite
              "title" : "Task Created on 9/9/2014",
              "dueDate" : "2014-09-12",
              "attachedToObjectType" : "COMPLAINT",
              "attachedToObjectId" : 2835,
              "assignee" : "samuel-acm",
              "status" : null,   // will be set to ASSIGNED if left null
              "percentComplete" : 10,
              "details" : "<strong>details</strong>",
              "taskStartDate" : "2014-09-10"
            }

## HTTP status code 200

Task created successfully. The response includes the new tasks's ID.

### Body

Type: application/json

Example:

    {
              "taskId" : 17401,
              "priority" : "Medium",
              "title" : "Task Created on 9/10/2014",
              "dueDate" : "2014-09-15T00:00:00.000+0000",
              "attachedToObjectType" : "COMPLAINT",
              "attachedToObjectId" : 2835,
              "assignee" : "samuel-acm",
              "businessProcessName" : null,
              "adhocTask" : false,
              "completed" : false,
              "status" : null,
              "percentComplete" : 0,
              "details" : "<strong>details</strong>",
              "taskStartDate" : "2014-09-10T00:00:00.000+0000",
              "taskFinishedDate" : null,
              "taskDurationInMillis" : null
            }

## HTTP status code 400

Task could not be created; perhaps the request body was invalid.

#### /plugin/task/save/{taskId} post

post

POST request to save the task

#### post /plugin/task/save/{taskId}

POST request to save the task

### URI Parameters

- taskId: required (number)

  Task ID of the task to be updated.

### Body

Type: application/json

Example:

    {
              "taskId" : 17401,
              "priority" : "High",
              "title" : "Task Updated on 9/10/2014",
              "dueDate" : "2014-09-15T00:00:00.000+0000",
              "attachedToObjectType" : "COMPLAINT",
              "attachedToObjectId" : 2835,
              "assignee" : "samuel-acm",
              "businessProcessName" : null,
              "adhocTask" : false,
              "completed" : false,
              "status" : null,
              "percentComplete" : 20,
              "details" : "<strong>updated details</strong>",
              "taskStartDate" : "2014-09-10T00:00:00.000+0000",
              "taskFinishedDate" : null,
              "taskDurationInMillis" : null
            }

## HTTP status code 200

Task updated successfully. The response is the updated task.

### Body

Type: application/json

Example:

    {
              "taskId" : 17401,
              "priority" : "High",
              "title" : "Task Updated on 9/10/2014",
              "dueDate" : "2014-09-15T00:00:00.000+0000",
              "attachedToObjectType" : "COMPLAINT",
              "attachedToObjectId" : 2835,
              "assignee" : "samuel-acm",
              "businessProcessName" : null,
              "adhocTask" : false,
              "completed" : false,
              "status" : null,
              "percentComplete" : 20,
              "details" : "<strong>updated details</strong>",
              "taskStartDate" : "2014-09-10T00:00:00.000+0000",
              "taskFinishedDate" : null,
              "taskDurationInMillis" : null
            }

#### /plugin/task/byId/{taskId} get

get

Get task details by the task ID.

#### get /plugin/task/byId/{taskId}

Get task details by the task ID.

### URI Parameters

- taskId: required (string)

## HTTP status code 200

Normal response; body includes the task details.

### Body

Type: application/json

Example:

    {
              "taskId" : 17401,
              "priority" : "High",
              "title" : "Task Updated on 9/10/2014",
              "dueDate" : "2014-09-15T00:00:00.000+0000",
              "attachedToObjectType" : "COMPLAINT",
              "attachedToObjectId" : 2835,
              "assignee" : "samuel-acm",
              "businessProcessName" : null,
              "adhocTask" : true,
              "completed" : false,
              "status" : "ASSIGNED",
              "percentComplete" : 20,
              "details" : "<strong>updated details</strong>",
              "taskStartDate" : "2014-09-10T00:00:00.000+0000",
              "taskFinishedDate" : null,
              "taskDurationInMillis" : null
            }

## HTTP status code 500

Could not get the task details; task does not exist, or an Activiti error

### Body

Type: text/plain

Example:

    Task with ID '92838' does not exist.

#### /plugin/search

#### /plugin/search/{objectType} get

get

Get a list of objects by object type. Used to populate object lists in the user interface.

#### get /plugin/search/{objectType}

Get a list of objects by object type. Used to populate object lists in the user interface.

### URI Parameters

- objectType: required (string)

  The object type you are searching for. Must be a value from the object_type_s field in the SOLR advanced search index. CASE_FILE, TASK, COMPLAINT, FILE...

### Query Parameters

- s (string)

  Sort column. Must be a field from the SOLR advanced search index. Must be followed by "desc" for descending sort, or "asc" for ascending sort.

  Example:

      name desc

- start (integer)

  Index of the first row to be returned. 0 is the first row of the first page. Used for pagination. If you use start, also supply an "s" paramter for consistent sorting.

  Example:

      11

- n (integer)

  Number of rows to be returned. This is the page size for pagination.

  Example:

      50

- assignee (string)

  User ID of the assignee whose rows you want to see. If supplied, only rows with assignee_id_lcs field equal to this value will be returned.

  Example:

      ann-acm

- activeOnly (boolean)

  If true, rows with status_lcs field equal to COMPLETE or DELETE will not be included in the results. Used to display only active rows.

  Example:

      true

## HTTP status code 200

### Body

Type: application/json

Example:

    {
              "responseHeader":{
                "status":0,
                "QTime":1,
                "params":{
                  "sort":"name desc",
                  "indent":"true",
                  "start":"0",
                  "q":"object_type_s:CASE_FILE AND -status_lcs:COMPLETE AND -status_lcs:DELETE",
                  "wt":"json",
                  "rows":"50"}},
              "response":{"numFound":7,"start":0,"docs":[
                  {
                    "id":"4893-CASE_FILE",
                    "status_lcs":"ACTIVE",
                    "author":"ebmillar",
                    "creator_lcs":"ebmillar",
                    "modifier_lcs":"ebmillar",
                    "last_modified":"2014-11-18T08:09:29Z",
                    "create_dt":"2014-11-18T08:09:29Z",
                    "name":"20141118_4893",
                    "object_id_s":"4893",
                    "object_type_s":"CASE_FILE",
                    "_version_":1485115144778285056},
                  {
                    "id":"4822-CASE_FILE",
                    "status_lcs":"ACTIVE",
                    "author":"ebmillar",
                    "creator_lcs":"ebmillar",
                    "modifier_lcs":"ebmillar",
                    "last_modified":"2014-11-17T16:16:09Z",
                    "create_dt":"2014-11-17T16:16:09Z",
                    "name":"20141117_4822",
                    "object_id_s":"4822",
                    "object_type_s":"CASE_FILE",
                    "_version_":1485055166024515584},
                  {
                    "id":"4491-CASE_FILE",
                    "status_lcs":"ACTIVE",
                    "author":"ebmillar",
                    "creator_lcs":"ebmillar",
                    "modifier_lcs":"ebmillar",
                    "last_modified":"2014-11-14T14:39:19Z",
                    "create_dt":"2014-11-14T14:39:19Z",
                    "name":"20141114_4491",
                    "object_id_s":"4491",
                    "object_type_s":"CASE_FILE",
                    "_version_":1484777281865908224},
                  {
                    "id":"4473-CASE_FILE",
                    "status_lcs":"ACTIVE",
                    "author":"ebmillar",
                    "creator_lcs":"ebmillar",
                    "modifier_lcs":"ebmillar",
                    "last_modified":"2014-11-14T16:06:11Z",
                    "create_dt":"2014-11-14T14:04:00Z",
                    "name":"20141114_4473",
                    "object_id_s":"4473",
                    "object_type_s":"CASE_FILE",
                    "_version_":1484782747253735424},
                  {
                    "status_lcs":"DRAFT",
                    "create_dt":"2014-10-06T16:28:42Z",
                    "object_id_s":"508",
                    "owner_lcs":"ebmillar",
                    "deny_acl_ss":["TEST-DENY-ACL"],
                    "object_type_s":"CASE_FILE",
                    "allow_acl_ss":["TEST-ALLOW-ACL"],
                    "id":"508-CASE_FILE",
                    "modifier_lcs":"ebmillar",
                    "author":"ebmillar",
                    "creator_lcs":"ebmillar",
                    "last_modified":"2014-10-06T16:28:42Z",
                    "name":"20141006_508",
                    "_version_":1481249565804855296},
                  {
                    "status_lcs":"DRAFT",
                    "create_dt":"2014-10-06T16:23:23Z",
                    "object_id_s":"507",
                    "owner_lcs":"ebmillar",
                    "deny_acl_ss":["TEST-DENY-ACL"],
                    "object_type_s":"CASE_FILE",
                    "allow_acl_ss":["TEST-ALLOW-ACL"],
                    "id":"507-CASE_FILE",
                    "modifier_lcs":"ebmillar",
                    "author":"ebmillar",
                    "creator_lcs":"ebmillar",
                    "last_modified":"2014-10-06T16:23:23Z",
                    "name":"20141006_507",
                    "_version_":1481249565802758144},
                  {
                    "status_lcs":"CLOSED",
                    "create_dt":"2014-10-06T16:01:41Z",
                    "object_id_s":"506",
                    "owner_lcs":"ebmillar",
                    "deny_acl_ss":["TEST-DENY-ACL"],
                    "object_type_s":"CASE_FILE",
                    "allow_acl_ss":["TEST-ALLOW-ACL"],
                    "id":"506-CASE_FILE",
                    "modifier_lcs":"ebmillar",
                    "author":"ebmillar",
                    "creator_lcs":"ebmillar",
                    "last_modified":"2014-10-06T17:50:08Z",
                    "name":"20141006_506",
                    "_version_":1481252322875015168}]
              }}

#### /plugin/search/quickSearch get

get

Query the quickSearch search index. The Quicksearch index contains only selected metadata and is smaller than the full index; so it should be faster to search.

#### get /plugin/search/quickSearch

Query the quickSearch search index. The Quicksearch index contains only selected metadata and is smaller than the full index; so it should be faster to search.

### Query Parameters

- q required (string)

  The query string; must be a valid Apache Solr query string.

- s (string)

  The sort order. The sort key must be a field in the Solr quick search index. The key must be followed by " asc" or " desc". Optional; default null.

  Example:

      last_modified asc

- start (number)

  The first matching result to be returned. Useful for pagination. Optional; default 0.

- n (number)

  Number of results to be returned. Useful for pagination. Optional; default 10.

## HTTP status code 200

Normal response; includes either search results or an error message from Apache Solr. The example response below includes both a "response" JSON object and an "error" JSON object. Real responses only have one or the other; a "response" object for a successful search, and an "error" object if SOLR could not process the search.

### Body

Type: application/json

Example:

    {
              "responseHeader": {
                // 0 == success; there will be a response object (see below).  Any other value
                // is an error (there will be an error object).
                "status": 0,
                "QTime": 0,
                "params": {
                  "indent": "true",
                  "q": "*:*",
                  "_": "1403288137744",
                  "wt": "json",
                  "rows": "2"
                }
              },
              // NOTE: "response" object only exists if the status was 0.
              "response": {
                "numFound": 61,
                "start": 0,
                "docs": [
                  {
                    "id": "12-Complaint",
                    "status_lcs": "DRAFT",
                    "author": "ann-acm",
                    "creator_lcs": "ann-acm",
                    "modifier_lcs": "ann-acm",
                    "title": [
                      "Test 20140502_12"
                    ],
                    "last_modified": "2014-05-02T11:30:27Z",
                    "create_dt": "2014-05-02T11:30:27Z",
                    "name": "20140502_12",
                    "object_id_s": "12",
                    "object_type_s": "Complaint",
                    "_version_": 1471373882636107800
                  },
                  {
                    "id": "14-Complaint",
                    "status_lcs": "DRAFT",
                    "author": "ann-acm",
                    "creator_lcs": "ann-acm",
                    "modifier_lcs": "ann-acm",
                    "title": [
                      "Test 20140502_14"
                    ],
                    "last_modified": "2014-05-02T11:39:21Z",
                    "create_dt": "2014-05-02T11:39:21Z",
                    "name": "20140502_14",
                    "object_id_s": "14",
                    "object_type_s": "Complaint",
                    "_version_": 1471373882844774400
                  }
                ]
              }
              // NOTE: "error" object only exists if the status was NOT 0.
              "error": {
                "msg": "Can't determine a Sort Order (asc or desc) in sort spec 'sdf', pos=3",
                "code": 400
              }
            }

## HTTP status code 500

The server could not process the search request (Apache Solr is down, or some other error).

### Body

Type: text/plain

Example:

    Server encountered an exception.

### /users

#### /users/withPrivilege/{privilege} get

get

Get a list of users with the specified privilege. Used to obtain a list of users who are authorized to perform a certain action.

#### get /users/withPrivilege/{privilege}

Get a list of users with the specified privilege. Used to obtain a list of users who are authorized to perform a certain action.

### URI Parameters

- privilege: required (string)

## HTTP status code 200

expected response containing the list of users with the requested privilege.

### Body

Type: application/json

Example:

    [{"userId":"OPIS_Admin","fullName":"OPIS Admin","firstName":"OPIS","lastName":"Admin"},
         {"userId":"ann-acm","fullName":"Ann Administrator","firstName":"Ann","lastName":"Administrator"}]

#### /users/participantTypesForObjectTypeName/{objectTypeName} get

get

Retrieve the types of participants that can be assigned to a certain object type. For example, a Case could have a Case Agent, a Supervisor, and a list of Approvers.

#### get /users/participantTypesForObjectTypeName/{objectTypeName}

Retrieve the types of participants that can be assigned to a certain object type. For example, a Case could have a Case Agent, a Supervisor, and a list of Approvers.

### URI Parameters

- objectTypeName: required (string)

## HTTP status code 200

Expected response; a JSON array of participant types. The type property can be SINGLE_USER, MULTIPLE_USERS, SINGLE_LDAP_GROUP, MULTIPLE_LDAP_GROUPS, SINGLE_APPLICATION_ROLE, or MULTIPLE_APPLICATION_ROLES.

### Body

Type: application/json

Example:

    [
          {
            "name" : "Complaint Owner",
            "description" : "The user who is responsible for completing the complaint.",
            "type" : "SINGLE_USER",
            "requiredOnACL" : true
          },
          {
            "name" : "Complaint Supervisor",
            "description" : "The user who has oversight over how the complaint is completed.",
            "type" : "SINGLE_USER",
            "requiredOnACL" : false
          },
          {
            "name" : "Complaint Group",
            "description" : "The group responsible for this type of complaint.",
            "type" : "SINGLE_LDAP_GROUP",
            "requiredOnACL" : false
          },
          {
            "name" : "Complaint Approver",
            "description" : "The users allowed to approve the complaint.",
            "type" : "MULTIPLE_USERS",
            "requiredOnACL" : false
          }
        ]

## HTTP status code 500

The requested objectTypeName was not recognized.

### Body

Type: text/plain

Example:

    No such business object with name 'unrecognized'

### /authenticationtoken

#### /authenticationtoken get

get

Retrieve an authentication token that may be appended to subsequent requests. Such a token authenticates those future requests as the user that generated the token.

#### get /authenticationtoken

Retrieve an authentication token that may be appended to subsequent requests. Such a token authenticates those future requests as the user that generated the token.

## HTTP status code 200

Successful response. The body consists of the authentication token. Append it to future service requests, e.g., /api/v1/ ?acm_ticket=

### Body

Type: text/plain

Example:

    2cf2ab49-9ce9-45bd-a307-a452b24dd789