Skip to content

Get a grant

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

OK

Media typeapplication/json

Versioned user delegation grant constraining what a principal may do on behalf of a user.

object
id
required

Prefixed ULID (grt_…)

string
/^grt_[0-9A-HJKMNP-TV-Z]{26}$/
version
required
integer
userId
required
string
tenantId
required
string
principalId
required
string
status
required
string
Allowed values: active revoked expired
createdAt
required
string format: date-time
expiresAt
One of:
string format: date-time
revokedAt
One of:
string format: date-time
operations
required
Array<string>
Allowed values: discover preserve write remove restore migrate monitor automate billable_execute
actions
required
Array<string>
Allowed values: read_inventory read_quota read_vault search_vault create_plan preserve trash restore copy move migrate_external unsubscribe monitor automate manage_grants delete_vault_object delete_account permanent_delete
sources
One of:
Array<string>
containers
One of:
Array<string>
assetKinds
One of:
Array<string>
maxObjectsPerPlan
One of:
integer
maxBytesPerPlan
One of:
integer
maxPlansPerDay
One of:
integer
allowedDestinations
One of:
Array<string>
allowExternalDestinations
boolean
allowDestructive
boolean
allowAutomatic
boolean
requireShadowPlan
boolean
requireHumanApprovalAbove
string
Allowed values: read low medium high critical
minConfidence
number
commercialCeilingCents
One of:
integer
timeWindow
One of:
object
startHourUtc
required
integer
endHourUtc
required
integer
Example
{
"id": "grt_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"status": "active",
"operations": [
"discover"
],
"actions": [
"read_inventory"
],
"requireHumanApprovalAbove": "read"
}
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"
}
]
}