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/d95ac080eefa9ffc396a86e80ab3f79456b8bc3705049b53bf3c6fa69996a894
Headers
accept: application/json
content-type: application/json
accept-encoding: identity
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 'accept-encoding: identity' \
-H 'content-length: 49' \
--compressed -H 'Accept-Encoding: gzip, deflate' \
-d '{"description":"some.file_list_item.description"}' \
-u YOUR_API_CLIENT_ID \
'https://api.apjc.amp.cisco.com/v1/file_lists/e773a9eb-296c-40df-98d8-bed46322589d/files/d95ac080eefa9ffc396a86e80ab3f79456b8bc3705049b53bf3c6fa69996a894'
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 'accept-encoding: identity' \ -H 'content-length: 49' \ --compressed -H 'Accept-Encoding: gzip, deflate' \ -d '{"description":"some.file_list_item.description"}' \ -u YOUR_API_CLIENT_ID \ 'https://api.apjc.amp.cisco.com/v1/file_lists/e773a9eb-296c-40df-98d8-bed46322589d/files/d95ac080eefa9ffc396a86e80ab3f79456b8bc3705049b53bf3c6fa69996a894'
Shortened for readability
content-type: application/json transfer-encoding: chunked status: 201 Created x-ratelimit-limit: 3000 x-ratelimit-reset: 877 strict-transport-security: max-age=31536000; includeSubDomains, max-age=31536000 referrer-policy: strict-origin-when-cross-origin x-ratelimit-remaining: 2807 x-permitted-cross-domain-policies: none x-download-options: noopen etag: W/"d92af33769732846c97fc68c46a3c595" x-frame-options: SAMEORIGIN x-ratelimit-resetdate: 2022-03-18T11:55:11Z
{
"version": "v1.2.0",
"metadata": {
"links": {
"self": "https://api.apjc.amp.cisco.com/v1/file_lists/e773a9eb-296c-40df-98d8-bed46322589d/files/d95ac080eefa9ffc396a86e80ab3f79456b8bc3705049b53bf3c6fa69996a894"
}
},
"data": {
"sha256": "d95ac080eefa9ffc396a86e80ab3f79456b8bc3705049b53bf3c6fa69996a894",
"description": "some.file_list_item.description",
"source": "Created by entering SHA-256 via Public api.",
"links": {
"file_list": "https://api.apjc.amp.cisco.com/v1/file_lists/e773a9eb-296c-40df-98d8-bed46322589d"
}
}
}