Attachment

This documentation is currently outdated and in the process of being updated. This documentation is provided as a temporary reference to various API endpoints and output. This warning will be at the top of each outdated page. As the documentation is updated, this warning will be removed.

Uploading One or More Attachment Files for a Tag

Upload one or more attachments to a tag.

API Call: POST/client/{clientId}/tag/{tagId}/attachment

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID
TAGID Tag ID number.

User Roles

The user role that can upload one or more attachment files for a tag is:

  • The owner of the specified tag ONLY

API Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token

cURL

cURL Sample uploadattachment_tag Snippet

Copy

curl -X POST "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"
  -H  "Content-Type: multipart/form-data"
  -F "attachments=@<ATTACHMENTFILE>;type=<ATTACHMENTTYPE>"

Make sure to replace the angle bracket parameters here with your own values.

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token
ATTACHMENTFILE Attachment file.
ATTACHMENTTYPE Attachment type.

Response Parameters

Sample Response

Copy

[
  {
    "uuid": "<UUID>",
    "filename": "<FILENAME>",
    "contentType": "<CONTENTTYPE>",
    "contentLength": <CONTENTLENGTH>
  }
]

Name Description Additional Information
UUID File UUID number.
FILENAME File name. Format: File.txt.
CONTENTTYPE Content type. Options: text/plain
CONTENTLENGTH Content length. integer

HTTP Status Codes

Code Description
200 Success

200 Sample Response

Copy
[
  {
    "filename": "string",
    "uuid": "string",
    "contentType": "string",
    "contentLength": 0
  }
]
Code Description
401 Unauthorized
403 Forbidden
404 Not Found

Listing Attachments on the Given Tag

List a tag's attachments.

API Call: GET/client/{clientId}/tag/{tagId}/attachment

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID
TAGID Tag ID number.

User Roles

The user role that can list attachments on the given tag is:

  • Dependent upon if the caller has access to the tag

API Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token

cURL

cURL Sample listattachment_tag Snippet

Copy

curl -X GET "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"

Make sure to replace the angle bracket parameters here with your own values.

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
TAGID Tag ID number
APIKEY Your API key. Generating an API Token

Response Parameters

Sample Response

Copy

[
  {
    "uuid": "<UUID>",
    "filename": "<FILENAME>",
    "contentType": "<CONTENTTYPE>",
    "contentLength": <CONTENTLENGTH>
  }
]

Name Description Additional Information
UUID File UUID number.
FILENAME File name. Format: File.txt.
CONTENTTYPE Content type. Options: text/plain
CONTENTLENGTH Content length. integer

HTTP Status Codes

Code Description
200 Success

200 Sample Response

Copy
[
  {
    "filename": "string",
    "uuid": "string",
    "contentType": "string",
    "contentLength": 0
  }
]
Code Description
401 Unauthorized
404 Not Found

Fetching Tag Attachment by UUID

Fetch tag attachment by tag attachment UUID.

API Call: GET/client/{clientId}/tag/{tagId}/attachment/{attachmentUUID}

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment/<ATTACHMENTUUID>

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID
TAGID Tag ID number.
ATTACHMENTUUID Attachment UUID number.

User Roles

The user role that can fetch attachments by UUID is:

  • Dependent upon if the caller has access to the tag

API Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token

cURL

cURL Sample fetchattachment_uuid Snippet

Copy

curl -X GET "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment/<ATTACHMENTUUID>"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"

Make sure to replace the angle bracket parameters here with your own values.

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
TAGID Tag ID number.
ATTACHMENTUUID Attachment UUID number.
APIKEY Your API key. Generating an API Token

Response Parameters

Sample Response

Copy

This is a test.

HTTP Status Codes

Code Description
200 Success
401 Unauthorized
404 Not Found
406 MIME Mismatch

Try changing from application/octet-stream to application/json or vice versa.

Removing an Attachment File for a Tag

Remove an attachment file from a tag.

API Call: DELETE/client/{clientId}/tag/{tagId}/attachment/{attachmentUUID}

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment/<ATTACHMENTUUID>

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID
TAGID Tag ID number.
ATTACHMENTUUID Attachment UUID number.

User Roles

The user role that can remove an attachment file from a tag is:

  • Only the owner of the specified tag can removes attached files

API Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token

cURL

cURL Sample remove_tagattachment Snippet

Copy

curl -X DELETE "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment/<ATTACHMENTUUID>"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"

Make sure to replace the angle bracket parameters here with your own values.

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
TAGID Tag ID number.
ATTACHMENTUUID Attachment UUID number.
APIKEY Your API key. Generating an API Token

Response Parameters

Sample Response

Copy

[
  "string"
]

HTTP Status Codes

Code Description
200 Success

200 Sample Response

Copy
[
  "string"
]
Code Description
401 Unauthorized
403 Forbidden
404 Not Found

Fetching Tag Attachment Metadata

Fetch tag attachment metadata.

API Call: GET/client/{clientId}/tag/{tagId}/attachment/{attachmentUUID}/meta

URL: https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment/<ATTACHMENTUUID>/meta

URL Parameters

Name Description Additional Information
PLATFORM Platform number. If you are on platform 1, you do not need to put a number.
CLIENTID Client ID number. Finding Your Client ID
TAGID Tag ID number.
ATTACHMENTUUID Attachment UUID number.

User Roles

The user role that can fetch tag attachment metadata is:

  • Dependent upon whether the caller has access to the tag.

API Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
APIKEY Your API key. Generating an API Token

cURL

cURL Sample fetch_tagAttachmentMetadata Snippet

Copy

curl -X GET "https://platform<PLATFORM>.risksense.com/api/v1/client/<CLIENTID>/tag/<TAGID>/attachment/<ATTACHMENTUUID>/meta"
  -H  "accept: application/json"
  -H  "x-api-key: <APIKEY>"

Make sure to replace the angle bracket parameters here with your own values.

cURL Parameters

Name Description Additional Information
PLATFORM Platform number.
CLIENTID Client ID number. Finding Your Client ID
TAGID Tag ID number.
ATTACHMENTUUID Attachment UUID number.
APIKEY Your API key. Generating an API Token

Response Parameters

Sample Response

Copy

[
  {
    "uuid": "<UUID>",
    "filename": "<FILENAME>",
    "contentType": "<CONTENTTYPE>",
    "contentLength": <CONTENTLENGTH>
  }
]

Name Description Additional Information
UUID File UUID number.
FILENAME File name. Format: File.txt.
CONTENTTYPE Content type. Options: text/plain
CONTENTLENGTH Content length. integer

HTTP Status Codes

Code Description
200 Success

200 Sample Response

Copy
{
  "filename": "string",
  "uuid": "string",
  "contentType": "string",
  "contentLength": 0
}
Code Description
401 Unauthorized
404 Not Found