Skip to content

Get a source

GET
/v1/sources/{id}
curl --request GET \
--url https://api.trustysweep.com/v1/sources/example \
--cookie sweep_session=<sweep_session>
id
required
string
/^src_[0-9A-HJKMNP-TV-Z]{26}$/

OK

Media typeapplication/json
object
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
kind
required
string
external_account_id
required
string
display_name
required
string
email
One of:
string
status
required
string
Allowed values: connected reauth_required revoked disconnected error pending
granted_scopes
Array<string>
granted_operations
required
Array<string>
Allowed values: discover preserve write remove restore migrate monitor automate billable_execute
connected_at
required
string format: date-time
last_scan_at
One of:
string format: date-time
last_delta_marker
One of:
string
connected_via_application_id
One of:

Prefixed ULID (app_…)

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

Prefixed ULID (cxn_…)

string
/^cxn_[0-9A-HJKMNP-TV-Z]{26}$/
simulated
required
boolean
policy
object
version
string
minAgeDays
integer
minSizeBytes
integer
excludeSenders
Array<string>
excludeDomains
Array<string>
excludeLabels
Array<string>
excludeFolders
Array<string>
excludeStarred
boolean
excludeShared
boolean
excludeRecentDays
integer
preserveMimeTypes
Array<string>
preserveKeywords
Array<string>
removePromotional
boolean
duplicateHandling
string
Allowed values: keep_newest keep_oldest review
sourceAction
string
Allowed values: trash none
preservation
string
Allowed values: vault_all vault_preserve_class_only
quota
One of:
object
used_bytes
required
integer
limit_bytes
required
One of:
integer
trash_bytes
integer
breakdown
object
key
additional properties
integer
observed_at
required
string format: date-time
growth_bytes_per_day
One of:
number
projected_full_at
One of:
string format: date-time
Example
{
"id": "src_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"provider": "google_gmail",
"status": "connected",
"granted_operations": [
"discover"
],
"connected_via_application_id": "app_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"connection_id": "cxn_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"policy": {
"duplicateHandling": "keep_newest",
"sourceAction": "trash",
"preservation": "vault_all"
}
}
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"
}
]
}