{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":468,"path":"api-reference/rest-apis/attachment_csm-api.md","title":"CSM Attachment API","bundle":null,"doc_type":null,"release":"australia","body":"\n# CSM Attachment API\n\nThe CSM Attachment API provides endpoints that allow both internal and external users to upload, download, and remove attachments associated with a table and to retrieve attachment metadata.\n\nOnly attachments associated with tables specified in the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** system property are valid in any of the associated endpoint calls. Any logged in user, both snc\\_internal and snc\\_external, can access this API. Guests and public users do not have access rights.\n\nThis API respects any system limitations on uploaded files, such as maximum file size and allowed attachment types. You can control these settings using the **com.glide.attachment.max\\_size** and **glide.attachment.extensions** properties.\n\nBy default, this API has a rate limit of 500 per hour for unauthenticated and snc\\_external users. For more information about rate limiting, see [Inbound REST API rate limiting](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/inbound-REST-API-rate-limiting.md).\n\n**Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md)\n\n## CSM Attachment - DELETE /now/attachment\\_csm/\\{sys\\_id\\}\n\nDeletes the specified attachment.\n\n### URL format\n\nVersioned URL: `/api/now/{api_version}/attachment_csm/{sys_id}`\n\nDefault URL: `/api/now/v1/attachment_csm/{sys_id}`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the attachment to delete. This attachment must belong to one of the tables listed within the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** property in the System Properties \\[sys\\_properties\\] table.Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|204|Successful. Indicates the request completed successfully.|\n|400|Bad Request. Indicates that the attachment from this table might not be accessible. Verify that the associated table is included in the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** system property.|\n|401|Unauthorized. The user credentials are incorrect or have not been passed.|\n|404|Not found. The requested item wasn't found.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON or XML\\)\n\n|Name|Description|\n|----|-----------|\n|None||\n\n### Sample cURL request\n\n```\ncurl \"https://instance.servicenow.com/api/now/v1/attachment_csm/615ea769c0a80166001cf5f2367302f5\" \\\n--request DELETE \\\n--user 'username':'password'\n```\n\n```\nNone\n```\n\n## CSM Attachment - GET /now/attachment\\_csm\n\nReturns the metadata for multiple attachments.\n\n**Note:** You can reference all sysparm query parameters using either their full name or their shortened name \\(without the **sysparm\\_** prefix\\). For example, for **sysparm\\_limit** you can also use **limit**.\n\n### URL format\n\nVersioned URL: `/api/now/{api_version}/attachment_csm`\n\nDefault URL: `/api/now/v1/attachment_csm`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table><table class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nsysparm\\_limit\n\n</td><td>\n\nMaximum number of records to return. For requests that exceed this number of records, use the **sysparm\\_offset** parameter to paginate record retrieval. This limit is applied before ACL evaluation. If no records return, including records you have access to, rearrange the record order so records you have access to return first.\n\n**Note:** Unusually large **sysparm\\_limit** values can impact system performance.\n\nData type: Number\n\nDefault: 10000\n\n</td></tr><tr id=\"row_sysparm_offset\"><td>\n\nsysparm\\_offset\n\n</td><td>\n\nStarting record index for which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks. For example, the first time you call this endpoint, **sysparm\\_offset** is set to \"0\". To simply page through all available records, use `sysparm_offset=sysparm_offset+sysparm_limit`, until you reach the end of all records.\n\nDon't pass a negative number in the **sysparm\\_offset** parameter.Data type: Number\n\nDefault: 0\n\n</td></tr><tr><td>\n\nsysparm\\_query\n\n</td><td>\n\nRequired. Encoded query to use to search for attachments.This parameter must at least contain `sysparm_query=table_name=<table>` where **&lt;table&gt;** can only be those tables specified in the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** property located in the System Properties \\[sys\\_properties\\] table.\n\nFor example: `sysparm_query=file_name=kb_knowledge`.\n\nSyntax: `sysparm_query=<col_name><operator><value>`.\n\n-   &lt;col\\_name&gt;: Name of the table column to filter against.\n-   &lt;operator&gt;: Supports the following values:\n\n    -   =: Exactly matches &lt;value&gt;.\n    -   !=: Does not match &lt;value&gt;.\n    -   ^: Logically AND multiple query statements.\n    -   ^OR: Logically OR multiple query statements.\n    -   LIKE: &lt;col\\_name&gt; contains the specified string. Only works for &lt;col\\_name&gt; fields whose data type is string.\n    -   STARTSWITH: &lt;col\\_name&gt; starts with the specified string. Only works for &lt;col\\_name&gt; fields whose data type is string.\n    -   ENDSWITH: &lt;col\\_name&gt; ends with the specified string. Only works for &lt;col\\_name&gt; fields whose data type is string.\n&lt;value&gt;: Value to match against.\n\n\nAll parameters are case-sensitive. Queries can contain more than one entry, such as `sysparm_query=<col_name><operator><value>[<operator><col_name><operator><value>]`.\n\nFor example:\n\n`(sysparm_query=caller_id=javascript:gs.getUserID()^active=true)`\n\nEncoded queries also supports order by functionality. To sort responses based on certain fields, use the `ORDERBY` and `ORDERBYDESC` clauses in **sysparm\\_query**.\n\nSyntax:\n\n-   `ORDERBY<col_name>`\n-   `ORDERBYDESC<col_name>`\n\nFor example: `sysparm_query=active=true^ORDERBYnumber^ORDERBYDESCcategory`\n\nThis query filters all active records and orders the results in ascending order by number, and then in descending order by category.\n\nData type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table>|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|401|Unauthorized. The user credentials are incorrect or have not been passed.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table id=\"table_osc_2tj_llb\"><thead><tr><th>\n\nElement\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresult\n\n</td><td>\n\nMetadata of the requested attachment.Data type: Object\n\n```\n\"result\": {\n  \"average_image_color\": \"String\",\n  \"compressed\": \"String\", \n  \"content_type\": \"String\",\n  \"created_by_name\": \"String\",\n  \"download_link\": \"String\",\n  \"file_name\": \"String\",\n  \"image_height\": \"String\",\n  \"image_width\": \"String\",\n  \"size_bytes\": \"String\",\n  \"size_compressed\": \"String\",\n  \"sys_created_by\": \"String\",\n  \"sys_created_on\": \"String\",\n  \"sys_id\": \"String\",\n  \"sys_mod_count\": \"String\",\n  \"sys_tags\": \"String\",\n  \"sys_updated_by\": \"String\",\n  \"sys_updated_on\": \"String\",\n  \"table_name\": \"String\",\n  \"table_sys_id\": \"String\",\n  \"updated_by_name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresult.average\\_image\\_color\n\n</td><td>\n\nIf the attachment is an image, the sum of all colors.Data type: String\n\nUnit: RGB or number of pixels.\n\n</td></tr><tr><td>\n\nresult.compressed\n\n</td><td>\n\nFlag that indicates whether the attachment file has been compressed.Possible values:\n\n-   true: File has been compressed.\n-   false: File has not been compressed.\n\nData type: String\n\n</td></tr><tr><td>\n\nresult.content\\_type\n\n</td><td>\n\nContent-type of the associated attachment file, such as image or jpeg or application/x-shockwave-flash.Data type: String\n\n</td></tr><tr><td>\n\nresult.created\\_by\\_name\n\n</td><td>\n\nFull name of entity that originally created the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.download\\_link\n\n</td><td>\n\nDownload URL of the attachment on the ServiceNow instance.Data type: String\n\n</td></tr><tr><td>\n\nresult.file\\_name\n\n</td><td>\n\nFile name of the attachment.Data type: String\n\n</td></tr><tr><td>\n\nresult.image\\_height\n\n</td><td>\n\nIf an image file, the height of the image.Data type: String\n\nUnit: Pixels\n\n</td></tr><tr><td>\n\nresult.image\\_width\n\n</td><td>\n\nIf an image file, the width of the image.Data type: String\n\nUnit: Pixels\n\n</td></tr><tr><td>\n\nresult.size\\_bytes\n\n</td><td>\n\nSize of the attachment.Data type: String\n\nUnit: Bytes\n\n</td></tr><tr><td>\n\nresult.size\\_compressed\n\n</td><td>\n\nSize of the compressed attachment file. If the file is not compressed, empty.Data type: String\n\nUnit: Bytes\n\n</td></tr><tr><td>\n\nresult.sys\\_created\\_by\n\n</td><td>\n\nEntity that originally created the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_created\\_on\n\n</td><td>\n\nDate and time that the attachment file was initially saved to the instance.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_id\n\n</td><td>\n\nSys\\_id of the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_mod\\_count\n\n</td><td>\n\nNumber of times the attachment file has been modified \\(uploaded to the instance\\).Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_tags\n\n</td><td>\n\nAny system tags associated with the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_updated\\_by\n\n</td><td>\n\nEntity that last updated the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_updated\\_on\n\n</td><td>\n\nDate and time that the attachment file was last updated.Data type: String\n\n</td></tr><tr><td>\n\nresult.table\\_name\n\n</td><td>\n\nName of the table to which the attachment is associated.Data type: String\n\n</td></tr><tr><td>\n\nresult.table\\_sys\\_id\n\n</td><td>\n\nSys\\_id of the table associated with the attachment.Data type: String\n\n</td></tr><tr><td>\n\nresult.updated\\_by\\_name\n\n</td><td>\n\nFull name of entity that last updated the attachment file.Data type: String\n\n</td></tr></tbody>\n</table>### Sample cURL request\n\n```\ncurl \"https://instance.service-now.com/api/now/v1/attachment_csm?sysparm_limit=1\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user \"username\":\"password\"\n```\n\n```\n{\n  \"result\": [\n    {\n      \"table_sys_id\": \"5054b6f8c0a800060056addcf551ecf8\",\n      \"size_bytes\": \"462\",\n      \"download_link\": \"https://instance.service-now.com/api/now/v1/attachment_csm/615ea769c0a80166001cf5f2367302f5/file\",\n      \"sys_updated_on\": \"2009-05-21 04:12:21\",\n      \"sys_id\": \"615ea769c0a80166001cf5f2367302f5\",\n      \"image_height\": \"\",\n      \"sys_created_on\": \"2009-05-21 04:12:21\",\n      \"file_name\": \"blocks.swf\",\n      \"sys_created_by\": \"glide.maint\",\n      \"compressed\": \"true\",\n      \"average_image_color\": \"\",\n      \"sys_updated_by\": \"glide.maint\",\n      \"sys_tags\": \"\",\n      \"table_name\": \"content_block_programmatic\",\n      \"image_width\": \"\",\n      \"sys_mod_count\": \"0\",\n      \"content_type\": \"application/x-shockwave-flash\",\n      \"size_compressed\": \"485\",\n      \"created_by_name\": \"John Smith\",\n      \"updated_by_name\": \"John Smith\"\n    }\n  ]\n}\n```\n\n## CSM Attachment - GET /now/attachment\\_csm/\\{sys\\_id\\}/file\n\nReturns the file attachment for the specified attachment sys\\_id.\n\n### URL format\n\nVersioned URL: `/api/now/{api_version}/attachment_csm/{sys_id}/file`\n\nDefault URL: `/api/now/v1/attachment_csm/{sys_id}/file`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the attachment. This attachment must belong to one of the tables listed within the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** property in the System Properties \\[sys\\_properties\\] table.Data type: String\n\nTable: Attachments \\[sys\\_attachment\\]\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td>\n\nData format of the response body. For example, use `image/jpeg` or `image/png` to accept JPEG or PNG image files exclusively. To allow all image types, specify `image/*`; to allow any file type, specify `*/*`.Default: \\*/\\*\n\n</td></tr></tbody>\n</table>|Header|Description|\n|------|-----------|\n|X-Attachment-Metadata|Metadata about the returned file, such as size, name, and file type.|\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. Indicates that the attachment from this table might not be accessible. Verify that the associated table is included in the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** system property.|\n|401|Unauthorized. The user credentials are incorrect or have not been passed.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters\n\n|Name|Description|\n|----|-----------|\n| |Contents of the attachment.|\n\n### Sample cURL request\n\n```\ncurl \"https://instance.servicenow.com/api/now/v1/attachment_csm/<attachment_sys_id>/file\" \\\n--request GET \\\n--header \"Accept:*/*\" \\\n--user 'username':'password'\n```\n\n```\nRecipient list Internal users Sheet1\nsys_id\temail\n Recipient list Internal users.xlsx\n```\n\n## CSM Attachment - GET /now/attachment\\_csm/\\{sys\\_id\\}\n\nReturns the metadata for the attachment file with the specific attachment sys\\_id.\n\n### URL format\n\nVersioned URL: `/api/now/{api_version}/attachment_csm/{sys_id}`\n\nDefault URL: `/api/now/v1/attachment_csm/{sys_id}`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nSys\\_id of the attachment record for which to return metadata. This attachment must belong to one of the tables listed within the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** property in the System Properties \\[sys\\_properties\\] table.Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table>|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. Indicates that the attachment from this table might not be accessible. Verify that the associated table is included in the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** system property.|\n|401|Unauthorized. The user credentials are incorrect.|\n|404|Not Found. Indicates the specified attachment does not exist, or the current user does not have the rights to access it.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table id=\"table_ezp_y1k_llb\"><thead><tr><th>\n\nElement\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresult\n\n</td><td>\n\nMetadata of the requested attachment.Data type: Object\n\n```\n\"result\": {\n  \"average_image_color\": \"String\",\n  \"compressed\": \"String\", \n  \"content_type\": \"String\",\n  \"created_by_name\": \"String\",\n  \"download_link\": \"String\",\n  \"file_name\": \"String\",\n  \"image_height\": \"String\",\n  \"image_width\": \"String\",\n  \"size_bytes\": \"String\",\n  \"size_compressed\": \"String\",\n  \"sys_created_by\": \"String\",\n  \"sys_created_on\": \"String\",\n  \"sys_id\": \"String\",\n  \"sys_mod_count\": \"String\",\n  \"sys_tags\": \"String\",\n  \"sys_updated_by\": \"String\",\n  \"sys_updated_on\": \"String\",\n  \"table_name\": \"String\",\n  \"table_sys_id\": \"String\",\n  \"updated_by_name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresult.average\\_image\\_color\n\n</td><td>\n\nIf the attachment is an image, the sum of all colors.Data type: String\n\nUnit: RGB or number of pixels.\n\n</td></tr><tr><td>\n\nresult.compressed\n\n</td><td>\n\nFlag that indicates whether the attachment file has been compressed.Possible values:\n\n-   true: File has been compressed.\n-   false: File has not been compressed.\n\nData type: String\n\n</td></tr><tr><td>\n\nresult.content\\_type\n\n</td><td>\n\nContent-type of the associated attachment file, such as image or jpeg or application/x-shockwave-flash.Data type: String\n\n</td></tr><tr><td>\n\nresult.created\\_by\\_name\n\n</td><td>\n\nFull name of entity that originally created the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.download\\_link\n\n</td><td>\n\nDownload URL of the attachment on the ServiceNow instance.Data type: String\n\n</td></tr><tr><td>\n\nresult.file\\_name\n\n</td><td>\n\nFile name of the attachment.Data type: String\n\n</td></tr><tr><td>\n\nresult.image\\_height\n\n</td><td>\n\nIf an image file, the height of the image.Data type: String\n\nUnit: Pixels\n\n</td></tr><tr><td>\n\nresult.image\\_width\n\n</td><td>\n\nIf an image file, the width of the image.Data type: String\n\nUnit: Pixels\n\n</td></tr><tr><td>\n\nresult.size\\_bytes\n\n</td><td>\n\nSize of the attachment.Data type: String\n\nUnit: Bytes\n\n</td></tr><tr><td>\n\nresult.size\\_compressed\n\n</td><td>\n\nSize of the compressed attachment file. If the file is not compressed, empty.Data type: String\n\nUnit: Bytes\n\n</td></tr><tr><td>\n\nresult.sys\\_created\\_by\n\n</td><td>\n\nEntity that originally created the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_created\\_on\n\n</td><td>\n\nDate and time that the attachment file was initially saved to the instance.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_id\n\n</td><td>\n\nSys\\_id of the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_mod\\_count\n\n</td><td>\n\nNumber of times the attachment file has been modified \\(uploaded to the instance\\).Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_tags\n\n</td><td>\n\nAny system tags associated with the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_updated\\_by\n\n</td><td>\n\nEntity that last updated the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_updated\\_on\n\n</td><td>\n\nDate and time that the attachment file was last updated.Data type: String\n\n</td></tr><tr><td>\n\nresult.table\\_name\n\n</td><td>\n\nName of the table to which the attachment is associated.Data type: String\n\n</td></tr><tr><td>\n\nresult.table\\_sys\\_id\n\n</td><td>\n\nSys\\_id of the table associated with the attachment.Data type: String\n\n</td></tr><tr><td>\n\nresult.updated\\_by\\_name\n\n</td><td>\n\nFull name of entity that last updated the attachment file.Data type: String\n\n</td></tr></tbody>\n</table>### Sample cURL request\n\n```\ncurl \"https://instance.servicenow.com/api/now/v1/attachment_csm/615ea769c0a80166001cf5f2367302f5\" \\\n--request GET \\\n--header \"Accept:application/json\" \\\n--user \"username\":\"password\"\n```\n\n```\n{\n  \"result\": {\n    \"table_sys_id\": \"5054b6f8c0a800060056addcf551ecf8\",\n    \"size_bytes\": \"462\",\n    \"download_link\": \"https://instance.service-now.com/api/now/v1/attachment_csm/615ea769c0a80166001cf5f2367302f5/file\",\n    \"sys_updated_on\": \"2019-05-21 04:12:21\",\n    \"sys_id\": \"615ea769c0a80166001cf5f2367302f5\",\n    \"image_height\": \"\",\n    \"sys_created_on\": \"2019-05-21 04:12:21\",\n    \"file_name\": \"blocks.swf\",\n    \"sys_created_by\": \"glide.maint\",\n    \"compressed\": \"true\",\n    \"average_image_color\": \"\",\n    \"sys_updated_by\": \"glide.maint\",\n    \"sys_tags\": \"\",\n    \"table_name\": \"content_block_programmatic\",\n    \"image_width\": \"\",\n    \"sys_mod_count\": \"0\",\n    \"content_type\": \"application/x-shockwave-flash\",\n    \"size_compressed\": \"485\",\n    \"created_by_name\": \"John Smith\",\n    \"updated_by_name\": \"John Smith\"\n  }\n}\n```\n\n## CSM Attachment - POST /now/attachment\\_csm/file\n\nUploads a specified binary file as an attachment to a specified record.\n\nThe endpoint also returns the metadata for the saved attachment.\n\n### URL format\n\nVersioned URL: `/api/now/{api_version}/attachment_csm/file`\n\nDefault URL: `/api/now/v1/attachment_csm/file`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table><table class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nencryption\\_context\n\n</td><td>\n\nSys\\_id of an encryption context record. Specify this parameter to allow only users with the specified encryption context to access the attachment. For additional information on encryption context records, see [Field Encryption](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/field-encryption.md).Data type: String\n\nDefault: Attached file is not encrypted with any encryption context.\n\n</td></tr><tr><td>\n\nfile\\_name\n\n</td><td>\n\nRequired. Name to give the attachment.**Note:** The file to attach must be specified after the last parameter in the passed-in query parameter list.\n\nData type: String\n\n</td></tr><tr><td>\n\ntable\\_name\n\n</td><td>\n\nRequired. Name of the table to which you want to attach the file. This table must be listed within the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** system property in the System Properties \\[sys\\_properties\\] table.Data type: String\n\n</td></tr><tr><td>\n\ntable\\_sys\\_id\n\n</td><td>\n\nRequired. Sys\\_id of the record on the specified table to which you want to attach the file. Data type: String\n\n</td></tr></tbody>\n</table><table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;String&gt;\n\n</td><td>\n\nPath to the binary file to attach to the specified record.Data type: String\n\n</td></tr></tbody>\n</table>### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr><tr><td>\n\nContent-Type\n\n</td><td>\n\nRequired. Data format of the file to post. For example, use `image/jpeg` or `image/png` to post JPEG or PNG image files exclusively. To allow all image types, specify `image/*`; to allow any file type, specify `*/*`.\n\n</td></tr></tbody>\n</table>|Header|Description|\n|------|-----------|\n|None| |\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. Indicates that the attachment from this table might not be accessible. Verify that the associated table is included in the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** system property.|\n|401|Unauthorized. The user credentials are incorrect or have not been passed.|\n|404|Not Found. Indicates the record specified by the **table\\_name** and **table\\_sys\\_id** parameters does not exist or is not accessible by the current user.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table id=\"table_kbr_qck_llb\"><thead><tr><th>\n\nElement\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresult\n\n</td><td>\n\nMetadata of the requested attachment.Data type: Object\n\n```\n\"result\": {\n  \"average_image_color\": \"String\",\n  \"compressed\": \"String\", \n  \"content_type\": \"String\",\n  \"created_by_name\": \"String\",\n  \"download_link\": \"String\",\n  \"file_name\": \"String\",\n  \"image_height\": \"String\",\n  \"image_width\": \"String\",\n  \"size_bytes\": \"String\",\n  \"size_compressed\": \"String\",\n  \"sys_created_by\": \"String\",\n  \"sys_created_on\": \"String\",\n  \"sys_id\": \"String\",\n  \"sys_mod_count\": \"String\",\n  \"sys_tags\": \"String\",\n  \"sys_updated_by\": \"String\",\n  \"sys_updated_on\": \"String\",\n  \"table_name\": \"String\",\n  \"table_sys_id\": \"String\",\n  \"updated_by_name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresult.average\\_image\\_color\n\n</td><td>\n\nIf the attachment is an image, the sum of all colors.Data type: String\n\nUnit: RGB or number of pixels.\n\n</td></tr><tr><td>\n\nresult.compressed\n\n</td><td>\n\nFlag that indicates whether the attachment file has been compressed.Possible values:\n\n-   true: File has been compressed.\n-   false: File has not been compressed.\n\nData type: String\n\n</td></tr><tr><td>\n\nresult.content\\_type\n\n</td><td>\n\nContent-type of the associated attachment file, such as image or jpeg or application/x-shockwave-flash.Data type: String\n\n</td></tr><tr><td>\n\nresult.created\\_by\\_name\n\n</td><td>\n\nFull name of entity that originally created the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.download\\_link\n\n</td><td>\n\nDownload URL of the attachment on the ServiceNow instance.Data type: String\n\n</td></tr><tr><td>\n\nresult.file\\_name\n\n</td><td>\n\nFile name of the attachment.Data type: String\n\n</td></tr><tr><td>\n\nresult.image\\_height\n\n</td><td>\n\nIf an image file, the height of the image.Data type: String\n\nUnit: Pixels\n\n</td></tr><tr><td>\n\nresult.image\\_width\n\n</td><td>\n\nIf an image file, the width of the image.Data type: String\n\nUnit: Pixels\n\n</td></tr><tr><td>\n\nresult.size\\_bytes\n\n</td><td>\n\nSize of the attachment.Data type: String\n\nUnit: Bytes\n\n</td></tr><tr><td>\n\nresult.size\\_compressed\n\n</td><td>\n\nSize of the compressed attachment file. If the file is not compressed, empty.Data type: String\n\nUnit: Bytes\n\n</td></tr><tr><td>\n\nresult.sys\\_created\\_by\n\n</td><td>\n\nEntity that originally created the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_created\\_on\n\n</td><td>\n\nDate and time that the attachment file was initially saved to the instance.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_id\n\n</td><td>\n\nSys\\_id of the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_mod\\_count\n\n</td><td>\n\nNumber of times the attachment file has been modified \\(uploaded to the instance\\).Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_tags\n\n</td><td>\n\nAny system tags associated with the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_updated\\_by\n\n</td><td>\n\nEntity that last updated the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_updated\\_on\n\n</td><td>\n\nDate and time that the attachment file was last updated.Data type: String\n\n</td></tr><tr><td>\n\nresult.table\\_name\n\n</td><td>\n\nName of the table to which the attachment is associated.Data type: String\n\n</td></tr><tr><td>\n\nresult.table\\_sys\\_id\n\n</td><td>\n\nSys\\_id of the table associated with the attachment.Data type: String\n\n</td></tr><tr><td>\n\nresult.updated\\_by\\_name\n\n</td><td>\n\nFull name of entity that last updated the attachment file.Data type: String\n\n</td></tr></tbody>\n</table>### Sample cURL request\n\nShows how to upload the .jpg file `Issue_screenshot.jpg` in the `/images` directory.\n\n```\ncurl \"https://instance.servicenow.com/api/now/v1/attachment_csm/file?table_name=incident&table_sys_id=d71f7935c0a8016700802b64c67c11c6&file_name=Issue_screenshot\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type: image/jpeg\" \\\n--user \"username\":\"password\" \\\n--data-binary \"@/images/Issue_screenshot.jpg\"\n```\n\n```\n{\n  \"result\": {\n    \"table_sys_id\": \"d71f7935c0a8016700802b64c67c11c6\",\n    \"size_bytes\": \"36597\",\n    \"download_link\": \"https://instance.service-now.com/api/now/v1/attachment_csm/6ea10fe64f411200adf9f8e18110c739/file\",\n    \"sys_updated_on\": \"2019-01-22 15:14:07\",\n    \"sys_id\": \"6ea10fe64f411200adf9f8e18110c739\",\n    \"image_height\": \"\",\n    \"sys_created_on\": \"2019-01-22 15:14:07\",\n    \"file_name\": \"Issue_screenshot\",\n    \"sys_created_by\": \"username\",\n    \"compressed\": \"true\",\n    \"average_image_color\": \"\",\n    \"sys_updated_by\": \"username\",\n    \"sys_tags\": \"\",\n    \"table_name\": \"incident\",\n    \"image_width\": \"\",\n    \"sys_mod_count\": \"0\",\n    \"content_type\": \"image/jpeg\",\n    \"size_compressed\": \"25130\",\n    \"created_by_name\": \"John Smith\",\n    \"updated_by_name\": \"John Smith\"\n  }\n}\n```\n\n## CSM Attachment - POST /now/attachment\\_csm/upload\n\nUploads a multipart file attachment.\n\nThe multipart POST method does not accept any parameters. You must specify the table name and record sys\\_id values within the form body. See the cURL example below for a sample of a multipart/form-data request.\n\n**Note:** When using multipart POST, ensure the file content is contained in the final part of the message only. Earlier parts should contain only metadata such as table name and record sys\\_id.\n\nWhen sending a multipart/form-data POST request to upload a file attachment, include attachment data in the form body, not in the URL parameters or request body.\n\n<table id=\"table_p1v_nnj_js\"><thead><tr><th>\n\nValue\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nContent-Type\n\n</td><td>\n\nContent-Type of the file, included in the message body for multipart uploads.**Note:** You must define the Content-Type within the file portion of the POST message, not within the form data.\n\n Data type: String\n\n</td></tr><tr><td>\n\ntable\\_name\n\n</td><td>\n\nName of the table to which you want to attach the file. This table must be specified in the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** property in the System Properties \\[sys\\_properties\\] table.Data type: String\n\n</td></tr><tr><td>\n\ntable\\_sys\\_id\n\n</td><td>\n\nSys\\_id of the record on the specified table to which you want to attach the file.Data type: String\n\n</td></tr></tbody>\n</table>### URL format\n\nVersioned URL: `/api/now/{api_version}/attachment_csm/upload`\n\nDefault URL: `/api/now/v1/attachment_csm/upload`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Header|Description|\n|------|-----------|\n|Content-Type|Data format of the request body. Set this value to `multipart/form-data` when using the multipart POST method.|\n\n|Header|Description|\n|------|-----------|\n|Location|URL of the new attachment in the ServiceNow platform instance.|\n\n### Status codes\n\nThe following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|201|Successful. Indicates the request completed successfully.|\n|400|Bad Request. Indicates that the attachment from this table might not be accessible. Verify that the associated table is included in the **glide.rest.attachment\\_csm\\_api.allowed\\_tables** system property.|\n|401|Unauthorized. The user credentials are incorrect or have not been passed.|\n|404|Not found. The requested item was not found.|\n|500|Internal server error. An unexpected error occurred while processing the request.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table id=\"table_bbj_pfk_llb\"><thead><tr><th>\n\nElement\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresult\n\n</td><td>\n\nMetadata of the requested attachment.Data type: Object\n\n```\n\"result\": {\n  \"average_image_color\": \"String\",\n  \"compressed\": \"String\", \n  \"content_type\": \"String\",\n  \"created_by_name\": \"String\",\n  \"download_link\": \"String\",\n  \"file_name\": \"String\",\n  \"image_height\": \"String\",\n  \"image_width\": \"String\",\n  \"size_bytes\": \"String\",\n  \"size_compressed\": \"String\",\n  \"sys_created_by\": \"String\",\n  \"sys_created_on\": \"String\",\n  \"sys_id\": \"String\",\n  \"sys_mod_count\": \"String\",\n  \"sys_tags\": \"String\",\n  \"sys_updated_by\": \"String\",\n  \"sys_updated_on\": \"String\",\n  \"table_name\": \"String\",\n  \"table_sys_id\": \"String\",\n  \"updated_by_name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresult.average\\_image\\_color\n\n</td><td>\n\nIf the attachment is an image, the sum of all colors.Data type: String\n\nUnit: RGB or number of pixels.\n\n</td></tr><tr><td>\n\nresult.compressed\n\n</td><td>\n\nFlag that indicates whether the attachment file has been compressed.Possible values:\n\n-   true: File has been compressed.\n-   false: File has not been compressed.\n\nData type: String\n\n</td></tr><tr><td>\n\nresult.content\\_type\n\n</td><td>\n\nContent-type of the associated attachment file, such as image or jpeg or application/x-shockwave-flash.Data type: String\n\n</td></tr><tr><td>\n\nresult.created\\_by\\_name\n\n</td><td>\n\nFull name of entity that originally created the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.download\\_link\n\n</td><td>\n\nDownload URL of the attachment on the ServiceNow instance.Data type: String\n\n</td></tr><tr><td>\n\nresult.file\\_name\n\n</td><td>\n\nFile name of the attachment.Data type: String\n\n</td></tr><tr><td>\n\nresult.image\\_height\n\n</td><td>\n\nIf an image file, the height of the image.Data type: String\n\nUnit: Pixels\n\n</td></tr><tr><td>\n\nresult.image\\_width\n\n</td><td>\n\nIf an image file, the width of the image.Data type: String\n\nUnit: Pixels\n\n</td></tr><tr><td>\n\nresult.size\\_bytes\n\n</td><td>\n\nSize of the attachment.Data type: String\n\nUnit: Bytes\n\n</td></tr><tr><td>\n\nresult.size\\_compressed\n\n</td><td>\n\nSize of the compressed attachment file. If the file is not compressed, empty.Data type: String\n\nUnit: Bytes\n\n</td></tr><tr><td>\n\nresult.sys\\_created\\_by\n\n</td><td>\n\nEntity that originally created the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_created\\_on\n\n</td><td>\n\nDate and time that the attachment file was initially saved to the instance.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_id\n\n</td><td>\n\nSys\\_id of the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_mod\\_count\n\n</td><td>\n\nNumber of times the attachment file has been modified \\(uploaded to the instance\\).Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_tags\n\n</td><td>\n\nAny system tags associated with the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_updated\\_by\n\n</td><td>\n\nEntity that last updated the attachment file.Data type: String\n\n</td></tr><tr><td>\n\nresult.sys\\_updated\\_on\n\n</td><td>\n\nDate and time that the attachment file was last updated.Data type: String\n\n</td></tr><tr><td>\n\nresult.table\\_name\n\n</td><td>\n\nName of the table to which the attachment is associated.Data type: String\n\n</td></tr><tr><td>\n\nresult.table\\_sys\\_id\n\n</td><td>\n\nSys\\_id of the table associated with the attachment.Data type: String\n\n</td></tr><tr><td>\n\nresult.updated\\_by\\_name\n\n</td><td>\n\nFull name of entity that last updated the attachment file.Data type: String\n\n</td></tr></tbody>\n</table>### Sample cURL request\n\n```\ncurl \"https://instance.service-now.com/api/now/v1/attachment_csm/upload\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:multipart/form-data\" \\\n--user \"username\":\"password\" \\\n -F \"table_name=incident\" \\\n -F \"table_sys_id=d71f7935c0a8016700802b64c67c11c6\" \\\n -F \"uploadFile=@/image/banner-CS0001345_v1_1.jpeg\"\n\n```\n\n```\n{\n  \"result\": {\n    \"table_sys_id\": \"d71f7935c0a8016700802b64c67c11c6\",\n    \"size_bytes\": \"36597\",\n    \"download_link\": \"https://instance.service-now.com/api/now/v1/attachment_csm/994adbc64f511200adf9f8e18110c796/file\",\n    \"sys_updated_on\": \"2019-02-02 14:00:21\",\n    \"sys_id\": \"994adbc64f511200adf9f8e18110c796\",\n    \"image_height\": \"\",\n    \"sys_created_on\": \"2019-02-02 14:00:21\",\n    \"file_name\": \"banner-CS0001345_v1_1.jpeg\",\n    \"sys_created_by\": \"username\",\n    \"compressed\": \"true\",\n    \"average_image_color\": \"\",\n    \"sys_updated_by\": \"username\",\n    \"sys_tags\": \"\",\n    \"table_name\": \"incident\",\n    \"image_width\": \"\",\n    \"sys_mod_count\": \"0\",\n    \"content_type\": \"image/jpeg\",\n    \"size_compressed\": \"25130\",\n    \"created_by_name\": \"John Smith\",\n    \"updated_by_name\": \"John Smith\"\n  }\n}\n```\n\n"}}