Scheduled Exports

A Scheduled Export defines a recurring schedule for generating one of the built-in CSV exports and e-mailing it to a Site Admin recipient.

List Scheduled Exports

Endpoint

GET/scheduled_exports

Return Object

ScheduledExport[]

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

curl https://app.files.com/api/rest/v1/scheduled_exports.json \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

[
  {
    "id": 1,
    "name": "Monthly access review",
    "export_type": "permission_audit",
    "report_name": "Permission audit",
    "export_options": {
      "group_by": "user"
    },
    "user_id": 1,
    "disabled": true,
    "trigger": "daily",
    "interval": "month",
    "recurring_day": 1,
    "recurring_days": [
      1,
      15
    ],
    "schedule_id": 1,
    "schedule_days_of_week": [
      1,
      3,
      5
    ],
    "schedule_times_of_day": [
      "06:30"
    ],
    "schedule_time_zone": "Eastern Time (US & Canada)",
    "holiday_region": "us",
    "human_readable_schedule": "Runs every month at 06:30 AM UTC TZ.",
    "last_run_at": "2000-01-01T01:00:00Z",
    "last_export_id": 1,
    "created_at": "2000-01-01T01:00:00Z",
    "updated_at": "2000-01-01T01:00:00Z"
  }
]

Show Scheduled Export

Endpoint

GET/scheduled_exports/{id}

Return Object

ScheduledExport

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Request Parameters

ParameterDescription
id
int64
Required
Scheduled Export ID.

Example Request

curl https://app.files.com/api/rest/v1/scheduled_exports/{id}.json \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "name": "Monthly access review",
  "export_type": "permission_audit",
  "report_name": "Permission audit",
  "export_options": {
    "group_by": "user"
  },
  "user_id": 1,
  "disabled": true,
  "trigger": "daily",
  "interval": "month",
  "recurring_day": 1,
  "recurring_days": [
    1,
    15
  ],
  "schedule_id": 1,
  "schedule_days_of_week": [
    1,
    3,
    5
  ],
  "schedule_times_of_day": [
    "06:30"
  ],
  "schedule_time_zone": "Eastern Time (US & Canada)",
  "holiday_region": "us",
  "human_readable_schedule": "Runs every month at 06:30 AM UTC TZ.",
  "last_run_at": "2000-01-01T01:00:00Z",
  "last_export_id": 1,
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

Create Scheduled Export

Endpoint

POST/scheduled_exports

Return Object

ScheduledExport

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Request Parameters

ParameterDefaultDescription
name
string
Required
Name for this scheduled export.
export_type
string
Required
Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
export_options
object
Report-specific options. permission_audit supports group_by with user or path.
user_id
int64
Site Admin user who receives the completed export e-mail.
disabled
boolean
falseIf true, this scheduled export will not run.
trigger
string
"daily"Schedule trigger type: daily or custom_schedule.
Possible values: daily, custom_schedule
interval
string
If trigger is daily, this specifies how often to run the scheduled export.
recurring_day
int64
If trigger is daily, this selects the day number inside the chosen interval.
recurring_days
array(int64)
If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
schedule_id
int64
If trigger is custom_schedule, the reusable Schedule used instead of the scheduled export's schedule fields.
schedule_days_of_week
array(int64)
If trigger is custom_schedule, the 0-based weekdays used by the schedule.
schedule_times_of_day
array(string)
Times of day in HH:MM format for the scheduled export schedule.
schedule_time_zone
string
Time zone used by the scheduled export schedule.
holiday_region
string
Optional holiday region used by the scheduled export schedule.

Example Request

curl https://app.files.com/api/rest/v1/scheduled_exports.json \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"name":"Monthly access review","export_type":"permission_audit","export_options":{"group_by":"user"},"user_id":1,"disabled":true,"trigger":"daily","interval":"month","recurring_day":1,"recurring_days":[1,15],"schedule_id":1,"schedule_days_of_week":[1,3,5],"schedule_times_of_day":["06:30"],"schedule_time_zone":"Eastern Time (US & Canada)","holiday_region":"us"}' \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "name": "Monthly access review",
  "export_type": "permission_audit",
  "report_name": "Permission audit",
  "export_options": {
    "group_by": "user"
  },
  "user_id": 1,
  "disabled": true,
  "trigger": "daily",
  "interval": "month",
  "recurring_day": 1,
  "recurring_days": [
    1,
    15
  ],
  "schedule_id": 1,
  "schedule_days_of_week": [
    1,
    3,
    5
  ],
  "schedule_times_of_day": [
    "06:30"
  ],
  "schedule_time_zone": "Eastern Time (US & Canada)",
  "holiday_region": "us",
  "human_readable_schedule": "Runs every month at 06:30 AM UTC TZ.",
  "last_run_at": "2000-01-01T01:00:00Z",
  "last_export_id": 1,
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

Update Scheduled Export

Endpoint

PATCH/scheduled_exports/{id}

Return Object

ScheduledExport

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Request Parameters

ParameterDescription
id
int64
Required
Scheduled Export ID.
name
string
Name for this scheduled export.
export_type
string
Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
export_options
object
Report-specific options. permission_audit supports group_by with user or path.
user_id
int64
Site Admin user who receives the completed export e-mail.
disabled
boolean
If true, this scheduled export will not run.
trigger
string
Schedule trigger type: daily or custom_schedule.
Possible values: daily, custom_schedule
interval
string
If trigger is daily, this specifies how often to run the scheduled export.
recurring_day
int64
If trigger is daily, this selects the day number inside the chosen interval.
recurring_days
array(int64)
If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
schedule_id
int64
If trigger is custom_schedule, the reusable Schedule used instead of the scheduled export's schedule fields.
schedule_days_of_week
array(int64)
If trigger is custom_schedule, the 0-based weekdays used by the schedule.
schedule_times_of_day
array(string)
Times of day in HH:MM format for the scheduled export schedule.
schedule_time_zone
string
Time zone used by the scheduled export schedule.
holiday_region
string
Optional holiday region used by the scheduled export schedule.

Example Request

curl https://app.files.com/api/rest/v1/scheduled_exports/{id}.json \
  -X PATCH \
  -H 'Content-Type: application/json' \
  -d '{"name":"Monthly access review","export_type":"permission_audit","export_options":{"group_by":"user"},"user_id":1,"disabled":true,"trigger":"daily","interval":"month","recurring_day":1,"recurring_days":[1,15],"schedule_id":1,"schedule_days_of_week":[1,3,5],"schedule_times_of_day":["06:30"],"schedule_time_zone":"Eastern Time (US & Canada)","holiday_region":"us"}' \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "name": "Monthly access review",
  "export_type": "permission_audit",
  "report_name": "Permission audit",
  "export_options": {
    "group_by": "user"
  },
  "user_id": 1,
  "disabled": true,
  "trigger": "daily",
  "interval": "month",
  "recurring_day": 1,
  "recurring_days": [
    1,
    15
  ],
  "schedule_id": 1,
  "schedule_days_of_week": [
    1,
    3,
    5
  ],
  "schedule_times_of_day": [
    "06:30"
  ],
  "schedule_time_zone": "Eastern Time (US & Canada)",
  "holiday_region": "us",
  "human_readable_schedule": "Runs every month at 06:30 AM UTC TZ.",
  "last_run_at": "2000-01-01T01:00:00Z",
  "last_export_id": 1,
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}

Delete Scheduled Export

Endpoint

DELETE/scheduled_exports/{id}

Return Object

No return value.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Request Parameters

ParameterDescription
id
int64
Required
Scheduled Export ID.

Example Request

curl https://app.files.com/api/rest/v1/scheduled_exports/{id}.json \
  -X DELETE \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

The ScheduledExport Object

Some of the endpoints above return a ScheduledExport object. The attributes of this object are listed below.

AttributeDescription
id
int64
Scheduled Export ID
name
string
Name for this scheduled export.
export_type
string
Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
report_name
string
Human-readable report name.
export_options
object
Report-specific options. permission_audit supports group_by with user or path.
user_id
int64
Site Admin user who receives the completed export e-mail.
disabled
boolean
If true, this scheduled export will not run.
trigger
string
Schedule trigger type: daily or custom_schedule.
Possible values: daily, custom_schedule
interval
string
If trigger is daily, this specifies how often to run the scheduled export.
recurring_day
int64
If trigger is daily, this selects the day number inside the chosen interval.
recurring_days
array(int64)
If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
schedule_id
int64
If trigger is custom_schedule, the reusable Schedule used instead of the scheduled export's schedule fields.
schedule_days_of_week
array(int64)
If trigger is custom_schedule, the 0-based weekdays used by the schedule.
schedule_times_of_day
array(string)
Times of day in HH:MM format for the scheduled export schedule.
schedule_time_zone
string
Time zone used by the scheduled export schedule.
holiday_region
string
Optional holiday region used by the scheduled export schedule.
human_readable_schedule
string
Human-readable schedule description.
last_run_at
date-time
Most recent scheduled run time.
last_export_id
int64
Most recent Export ID created by this schedule.
created_at
date-time
Creation time.
updated_at
date-time
Last update time.

Example ScheduledExport Object

{
  "id": 1,
  "name": "Monthly access review",
  "export_type": "permission_audit",
  "report_name": "Permission audit",
  "export_options": {
    "group_by": "user"
  },
  "user_id": 1,
  "disabled": true,
  "trigger": "daily",
  "interval": "month",
  "recurring_day": 1,
  "recurring_days": [
    1,
    15
  ],
  "schedule_id": 1,
  "schedule_days_of_week": [
    1,
    3,
    5
  ],
  "schedule_times_of_day": [
    "06:30"
  ],
  "schedule_time_zone": "Eastern Time (US & Canada)",
  "holiday_region": "us",
  "human_readable_schedule": "Runs every month at 06:30 AM UTC TZ.",
  "last_run_at": "2000-01-01T01:00:00Z",
  "last_export_id": 1,
  "created_at": "2000-01-01T01:00:00Z",
  "updated_at": "2000-01-01T01:00:00Z"
}