POST /v1/file_lists/{:file_list_guid}/files/{:sha256}
Description
This endpoint can be used to add a SHA-256 to a file list using file_list_guid.
Name | Type | Description |
---|---|---|
version | String | |
metadata.links.self | String | |
data.sha256 | String | |
data.description | String | |
data.source | String | |
data.links.file_list | String |
Examples
Create a file list item with a given SHA-256 for a specific file list with a given file_list_guid
Request
Requires AuthorizationPOST /v1/file_lists/e773a9eb-296c-40df-98d8-bed46322589d/files/4af3ba11307889b9cdd1194dedd0571f3e61bcb98eb6a04dbe2be63e041fd5ea
Headers
accept: application/json
content-type: application/json
authorization: Basic FILTERED
content-length: 49
cURL Edit, then copy and paste on your terminal
curl -X POST \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'content-length: 49' \
--compressed -H 'Accept-Encoding: gzip, deflate' \
-d '{"description":"some.file_list_item.description"}' \
-u YOUR_API_CLIENT_ID \
'https://api.amp.cisco.com/v1/file_lists/e773a9eb-296c-40df-98d8-bed46322589d/files/4af3ba11307889b9cdd1194dedd0571f3e61bcb98eb6a04dbe2be63e041fd5ea'
Body
{"description":"some.file_list_item.description"}
Response
cURL Edit, then copy and paste on your terminal
curl -X POST \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'content-length: 49' \ --compressed -H 'Accept-Encoding: gzip, deflate' \ -d '{"description":"some.file_list_item.description"}' \ -u YOUR_API_CLIENT_ID \ 'https://api.amp.cisco.com/v1/file_lists/e773a9eb-296c-40df-98d8-bed46322589d/files/4af3ba11307889b9cdd1194dedd0571f3e61bcb98eb6a04dbe2be63e041fd5ea'
Shortened for readability
strict-transport-security: max-age=31536000 content-type: application/json; charset=utf-8 status: 201 Created x-ratelimit-limit: 3000 x-ratelimit-reset: 1832 x-ratelimit-remaining: 2834 x-frame-options: SAMEORIGIN x-ratelimit-resetdate: 2019-01-09T17:44:06Z transfer-encoding: chunked
{
"version": "v1.2.0",
"metadata": {
"links": {
"self": "https://api.amp.cisco.com/v1/file_lists/e773a9eb-296c-40df-98d8-bed46322589d/files/4af3ba11307889b9cdd1194dedd0571f3e61bcb98eb6a04dbe2be63e041fd5ea"
}
},
"data": {
"sha256": "4af3ba11307889b9cdd1194dedd0571f3e61bcb98eb6a04dbe2be63e041fd5ea",
"description": "some.file_list_item.description",
"source": "Created by entering SHA-256 via Public api.",
"links": {
"file_list": "https://api.amp.cisco.com/v1/file_lists/e773a9eb-296c-40df-98d8-bed46322589d"
}
}
}