Documents
Supported document attributes:
| Attribute | Type | Description |
|---|---|---|
id | number | Unique identifier of the document. |
name | string | Name of the document. |
content_type | string | Content type of the document. |
size | number | Size of the document in bytes. |
resource_type | string | Name of the resource type the document is attached to. Possible values:
|
resource_id | number | Id of the resource the document is attached to. |
creator_id | number | Identifier of the user who attached the document. |
created_at | string | Date and time that the document was attached in UTC (ISO8601 format). |
Endpoints
Stream Document
Read the stream of document events.
See the Firehose Overview article for more details on request and response formats and parameters.
Action
GET /v3/documents/stream
Examples
Read the stream of document events
GET /v3/documents/stream?position=tailAccept: application/jsonAuthorization: Bearer $ACCESS_TOKENUser-Agent: $CLIENT_NAME
HTTP/1.1 200 OKContent-Type: application/json{"items": [{"data": {"content_type": "application/pdf","size": 5930154,"resource_type": "deal","creator_id": 1098718,"name": "attachment.pdf","resource_id": 7547550,"created_at": "2018-05-30T12:26:13Z","id": 1380001},"meta": {"event_cause": "interaction","sequence": 1,"event_id": "s94S_FMkTFG_cXPiCVv2iQ","event_type": "created","type": "document","event_time": "2018-05-30T12:26:13Z"}}],"meta": {"links": {"next": "https://api.getbase.com.com/v3/documents/stream?position=ZmlyZWhvc2UuZG9jdW1lbnQuYnlfYWNjb3VudCwwLDMx"},"position": "ZmlyZWhvc2UuZG9jdW1lbnQuYnlfYWNjb3VudCwwLDMx","top": false}}