GET api/Files/{id}/Fields

Retrieves a list of workgroup fields and their values for a file.

Request

Parameters

Name Description Default
id Unique file ID.
field ID or name of a specific field to retrieve. Omit to list all fields.

Response

Body

Content Type: application/xml or application/json
List of fields or an error message.

XML JSON
<Response>                     
  <Result>                     <!--Array of 'Item'--> 
    <Item>                     
      <ID>long</ID>            <!--Unique field ID--> 
      <Name>string</Name>      <!--Name of the field--> 
      <Value>object</Value>    <!--For single-value fields--> 
      <Values>                 <!--Array of 'Item'--> 
        <Item>object</Item>    <!--For multi-value fields--> 
      </Values>                
    </Item>                    
  </Result>                    
  <Message>string</Message>    <!--Error message--> 
</Response>                    
{                              
   "Result": [{                
      "ID": "long",            // Unique field ID
      "Name": "string",        // Name of the field
      "Value": "object",       // For single-value fields
      "Values": [ "object" ]   // For multi-value fields
   }],                         
   "Message": "string"         // Error message
}                              
                               

Status Codes

Code Condition
200 OK The operation completed successfully.
400 Bad RequestInvalid field or file ID.
401 Unauthorized Access token is invalid, expired or not specified.
403 ForbiddenThe user does not have permission to view the matter.
404 Not FoundFile not found.
406 Not Acceptable Content type specified in the Accept header isn't supported.
500 Internal Server Error An internal error occurred.

Remarks

Fields whose values are stored as XML in ContactsLaw (e.g. Interactive Forms Framework tables) are expressed as inline objects in the response.

If a specific field is requested, the response will still be an array, containing either a single entry (if the field is valid) or no entries.