Skip to content

Normalized inventory for a source

GET
/v1/sources/{id}/inventory
curl --request GET \
--url 'https://api.trustysweep.com/v1/sources/example/inventory?class=preserve&state=DISCOVERED&sort=size_desc&limit=50' \
--cookie sweep_session=<sweep_session>
id
required
string
/^src_[0-9A-HJKMNP-TV-Z]{26}$/
class
string
Allowed values: preserve likely_removable review promotional duplicate large_attachment cold recent protected_by_rule
min_size
integer
older_than_days
integer
kind
string
state
string
Allowed values: DISCOVERED SELECTED FETCHING VAULTING VERIFYING VAULT_COMMITTED SOURCE_ACTION_QUEUED SOURCE_TRASHED_OR_REMOVED RECLAIM_PENDING RECLAIM_CONFIRMED RESTORE_QUEUED RESTORED EXCLUDED SKIPPED FAILED
sort
string
Allowed values: size_desc modified_asc modified_desc
limit
integer
default: 50 >= 1 <= 200
cursor
string

Opaque cursor from next_cursor.

OK

Media typeapplication/json
object
data
required
Array<object>
object
id
required

Prefixed ULID (ast_…)

string
/^ast_[0-9A-HJKMNP-TV-Z]{26}$/
source_id
required

Prefixed ULID (src_…)

string
/^src_[0-9A-HJKMNP-TV-Z]{26}$/
provider
required
string
Allowed values: google_gmail google_drive microsoft_outlook microsoft_onedrive dropbox apple_local s3_compatible trusty_vault simulated
provider_object_id
required
string
provider_parent_id
One of:
string
provider_version
One of:
string
kind
required
string
Allowed values: message attachment file folder photo video statement other
name
required
string
path
One of:
string
containers
Array<string>
size_bytes
required
integer
mime_type
One of:
string
sha256
One of:
string
created_at
One of:
string format: date-time
modified_at
One of:
string format: date-time
observed_at
required
string format: date-time
message
object
from
string
to
Array<string>
cc
Array<string>
subject
string
date
string format: date-time
threadId
string
listId
string
listUnsubscribe
string
listUnsubscribePost
boolean
labels
Array<string>
snippet
string
classification
object
storageClass
required
string
Allowed values: preserve likely_removable review promotional duplicate large_attachment cold recent protected_by_rule
confidence
required
number
<= 1
source
required
string
Allowed values: deterministic rule ai_sonnet ai_opus user
reasons
Array<string>
protections
Array<string>
version
string
state
required
string
Allowed values: DISCOVERED SELECTED FETCHING VAULTING VERIFYING VAULT_COMMITTED SOURCE_ACTION_QUEUED SOURCE_TRASHED_OR_REMOVED RECLAIM_PENDING RECLAIM_CONFIRMED RESTORE_QUEUED RESTORED EXCLUDED SKIPPED FAILED
vault_object_id
One of:

Prefixed ULID (vlt_…)

string
/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/
manifest_id
One of:

Prefixed ULID (mfs_…)

string
/^mfs_[0-9A-HJKMNP-TV-Z]{26}$/
starred
boolean
shared
boolean
trashed
boolean
next_cursor
required
string | null
Example
{
"data": [
{
"id": "ast_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"source_id": "src_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"provider": "google_gmail",
"kind": "message",
"classification": {
"storageClass": "preserve",
"source": "deterministic"
},
"state": "DISCOVERED",
"vault_object_id": "vlt_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"manifest_id": "mfs_01J8Z3K9M2Q4R6S8T0V2W4X6Y8"
}
]
}
RateLimit-Limit
integer

Requests allowed in the current window.

RateLimit-Remaining
integer

Requests remaining in the current window.

RateLimit-Reset
integer

Seconds until the window resets.

Validation failed

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Unauthenticated

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Forbidden / action denied / step-up required

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Not found

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Rate limited

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}
Retry-After
integer

Seconds to wait before retrying.

RateLimit-Limit
integer

Requests allowed in the current window.

RateLimit-Remaining
integer

Requests remaining in the current window.

RateLimit-Reset
integer

Seconds until the window resets.

Internal error

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}