Determine if Attachments are Enabled on an Object
GET
/api/{version}/metadata/vobjects/{object_name}Headers
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{object_name} | The object name__v field value (product__v, country__v, custom_object__c, etc.). |
Request
Section link for Requestcurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v21.3/metadata/vobjects/site__vResponse (abridged)
Section link for Response (abridged){
"responseStatus": "SUCCESS",
"object": {
"created_date": "2014-02-03T20:12:29.000Z",
"created_by": 1,
"allow_attachments": true,
"auditable": true,
"modified_date": "2015-01-06T22:34:15.000Z",
"status": [
"active__v"
],
"urls": {
"field": "/api/v21.3/metadata/vobjects/site__v/fields/{NAME}",
"record": "/api/v21.3/vobjects/site__v/{id}",
"attachments": "/api/v21.3/vobjects/site__v/{id}/attachments",
"list": "/api/v21.3/vobjects/site__v",
"metadata": "/api/v21.3/metadata/vobjects/site__v"
},
"label_plural": "Study Sites",
"role_overrides": false,
"label": "Study Site",
"in_menu": true,
"help_content": null,
"source": "standard",
"order": null,
"modified_by": 46916,
"description": null,
"name": "site__v"
}
}Response Details
Section link for Response DetailsShown above, "allow_attachments" is set to true for this object and "attachments" is included in the list of urls, indicating that attachments are enabled on the site__v object. This means that any of the object records can have attachments.