Get Artifact Tags
Retrieve the tags of an artifact or artifacts.
Curl Example
# As an URL parameter $ curl -u $USERNAME:$KEY 'https://api.riskiq.net/pt/v2/artifact/tag?artifact=a9969326-4310-175d-d422-e83a36edaae0'
Response
{ "user_tags": [ "mytag" ], "tags": [ "registered", "mytag" ], "system_tags": [ "registered" ], "tag_meta": { "mytag": { "created_at": "2017-03-30T01:05:12.629000", "creator": "sim.gretina@example.org" } }, "success": true }
Remove Artifact Tags
Remove a set of tags from an artifact or artifacts.
Curl Example
$ curl -u $USERNAME:$KEY 'https://api.riskiq.net/pt/v2/artifact/tag' -XDELETE -H "Content-Type: application/json" --data '{"artifact": "a9969326-4310-175d-d422-e83a36edaae0", "tags": ["foo"]}'
JSON Request
{ "artifact": "a9969326-4310-175d-d422-e83a36edaae0", "tags": [ "foo" ] }
Response
{ "tags": [ "registered", "bar", "baz" ], "system_tags": [ "registered" ], "tag_meta": { "bar": { "creator": "sim.gretina@example.org", "created_at": "2017-04-17T19:28:40.284000" }, "baz": { "creator": "sim.gretina@example.org", "created_at": "2017-04-17T19:30:21.507000" } }, "success": true, "user_tags": [ "bar", "baz" ] }
Set Artifact Tags
Set the tags of an artifact or artifacts.
Curl Example
$ curl -u $USERNAME:$KEY 'https://api.riskiq.net/pt/v2/artifact/tag' -XPUT -H "Content-Type: application/json" --data '{"artifact": "a9969326-4310-175d-d422-e83a36edaae0", "tags": ["foo", "bar"]}'
JSON Request
{ "artifact": "a9969326-4310-175d-d422-e83a36edaae0", "tags": [ "foo", "bar" ] }
Response
{ "tags": [ "registered", "foo", "bar" ], "system_tags": [ "registered" ], "tag_meta": { "bar": { "creator": "sim.gretina@example.org", "created_at": "2017-04-17T19:28:40.284000" }, "foo": { "creator": "sim.gretina@example.org", "created_at": "2017-04-17T19:28:40.284000" } }, "success": true, "user_tags": [ "bar", "foo" ] }
Update Artifact Tags
Add tags to an artifact or artifacts.
Curl Example
$ curl -u $USERNAME:$KEY 'https://api.riskiq.net/pt/v2/artifact/tag' -XPOST -H "Content-Type: application/json" --data '{"artifact": "a9969326-4310-175d-d422-e83a36edaae0", "tags": ["baz"]}'
JSON Request
{ "artifact": "a9969326-4310-175d-d422-e83a36edaae0", "tags": [ "baz" ] }
Response
{ "tags": [ "registered", "foo", "bar", "baz" ], "system_tags": [ "registered" ], "tag_meta": { "bar": { "creator": "sim.gretina@example.org", "created_at": "2017-04-17T19:28:40.284000" }, "foo": { "creator": "sim.gretina@example.org", "created_at": "2017-04-17T19:28:40.284000" }, "baz": { "creator": "sim.gretina@example.org", "created_at": "2017-04-17T19:30:21.507000" } }, "success": true, "user_tags": [ "bar", "baz", "foo" ] }