Note
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| csp_create_page | POST /client-side-protection/v1/pages | Create page |
| csp_create_policy | POST /client-side-protection/v1/pages/{page_id}/policies | Create policy |
| csp_create_website | POST /client-side-protection/v1/websites | Create website |
| csp_delete_page | DELETE /client-side-protection/v1/pages/{page_id} | Delete page |
| csp_delete_website | DELETE /client-side-protection/v1/websites/{website_id} | Delete website |
| csp_get_page | GET /client-side-protection/v1/pages/{page_id} | Get page |
| csp_get_policy | GET /client-side-protection/v1/pages/{page_id}/policies/{policy_id} | Get policy |
| csp_get_script | GET /client-side-protection/v1/pages/{page_id}/scripts/{script_id} | Get script |
| csp_get_website | GET /client-side-protection/v1/websites/{website_id} | Get website |
| csp_list_header_events | GET /client-side-protection/v1/pages/{page_id}/events | List header events |
| csp_list_headers | GET /client-side-protection/v1/pages/{page_id}/headers | List security headers |
| csp_list_pages | GET /client-side-protection/v1/pages | List pages |
| csp_list_policies | GET /client-side-protection/v1/pages/{page_id}/policies | List policies |
| csp_list_policy_reports | GET /client-side-protection/v1/pages/{page_id}/policies/{policy_id}/reports | List policy reports |
| csp_list_scripts | GET /client-side-protection/v1/pages/{page_id}/scripts | List scripts |
| csp_list_websites | GET /client-side-protection/v1/websites | List websites |
| csp_update_page | PATCH /client-side-protection/v1/pages/{page_id} | Update page |
| csp_update_policy | PATCH /client-side-protection/v1/pages/{page_id}/policies/{policy_id} | Update policy |
| csp_update_script | PATCH /client-side-protection/v1/pages/{page_id}/scripts/{script_id} | Update script |
| csp_update_website | PATCH /client-side-protection/v1/websites/{website_id} | Update website |
Create a new page for monitoring.
let cfg = &Configuration::default();
let params = CspCreatePageParams {
// parameters
};
csp_create_page(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_create | Option<PageCreate> |
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Create a new Content Security Policy for a page.
let cfg = &Configuration::default();
let params = CspCreatePolicyParams {
// parameters
};
csp_create_policy(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| policy_create | Option<PolicyCreate> |
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Create a new website for Client-Side Protection monitoring.
let cfg = &Configuration::default();
let params = CspCreateWebsiteParams {
// parameters
};
csp_create_website(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| website_create | Option<WebsiteCreate> |
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Delete a page and all associated scripts and policies.
let cfg = &Configuration::default();
let params = CspDeletePageParams {
// parameters
};
csp_delete_page(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] |
(empty response body)
- Content-Type: Not defined
- Accept: application/problem+json
[Back to top] [Back to API list] [Back to README]
Delete a website and all associated pages, scripts, and policies.
let cfg = &Configuration::default();
let params = CspDeleteWebsiteParams {
// parameters
};
csp_delete_website(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| website_id | String | Website identifier | [required] |
(empty response body)
- Content-Type: Not defined
- Accept: application/problem+json
[Back to top] [Back to API list] [Back to README]
Get details for a specific page.
let cfg = &Configuration::default();
let params = CspGetPageParams {
// parameters
};
csp_get_page(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] |
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Get details for a specific policy.
let cfg = &Configuration::default();
let params = CspGetPolicyParams {
// parameters
};
csp_get_policy(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| policy_id | String | Policy identifier | [required] |
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Get details for a specific script.
let cfg = &Configuration::default();
let params = CspGetScriptParams {
// parameters
};
csp_get_script(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| script_id | String | Script identifier | [required] |
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Get details for a specific website.
let cfg = &Configuration::default();
let params = CspGetWebsiteParams {
// parameters
};
csp_get_website(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| website_id | String | Website identifier | [required] |
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
List security header change events for a page.
let cfg = &Configuration::default();
let params = CspListHeaderEventsParams {
// parameters
};
csp_list_header_events(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| limit | Option<i32> | Limit how many results are returned. | [default to 100] | |
| page | Option<i32> | Page number of the collection to request. | [default to 0] |
crate::models::InlineResponse20011
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
List security headers detected on a page.
let cfg = &Configuration::default();
let params = CspListHeadersParams {
// parameters
};
csp_list_headers(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| limit | Option<i32> | Limit how many results are returned. | [default to 100] | |
| page | Option<i32> | Page number of the collection to request. | [default to 0] |
crate::models::InlineResponse20010
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
List all pages. Optionally filter by website.
let cfg = &Configuration::default();
let params = CspListPagesParams {
// parameters
};
csp_list_pages(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| website_id | Option<String> | Filter pages by website ID | ||
| limit | Option<i32> | Limit how many results are returned. | [default to 100] | |
| page | Option<i32> | Page number of the collection to request. | [default to 0] |
crate::models::InlineResponse2006
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
List all Content Security Policies for a page.
let cfg = &Configuration::default();
let params = CspListPoliciesParams {
// parameters
};
csp_list_policies(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| limit | Option<i32> | Limit how many results are returned. | [default to 100] | |
| page | Option<i32> | Page number of the collection to request. | [default to 0] |
crate::models::InlineResponse2008
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
List CSP violation reports for a policy.
let cfg = &Configuration::default();
let params = CspListPolicyReportsParams {
// parameters
};
csp_list_policy_reports(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| policy_id | String | Policy identifier | [required] | |
| limit | Option<i32> | Limit how many results are returned. | [default to 100] | |
| page | Option<i32> | Page number of the collection to request. | [default to 0] |
crate::models::InlineResponse2009
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
List all scripts detected on a page.
let cfg = &Configuration::default();
let params = CspListScriptsParams {
// parameters
};
csp_list_scripts(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| limit | Option<i32> | Limit how many results are returned. | [default to 100] | |
| page | Option<i32> | Page number of the collection to request. | [default to 0] |
crate::models::InlineResponse2007
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
List all websites configured for Client-Side Protection.
let cfg = &Configuration::default();
let params = CspListWebsitesParams {
// parameters
};
csp_list_websites(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| limit | Option<i32> | Limit how many results are returned. | [default to 100] | |
| page | Option<i32> | Page number of the collection to request. | [default to 0] |
crate::models::InlineResponse2005
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Update a page's configuration.
let cfg = &Configuration::default();
let params = CspUpdatePageParams {
// parameters
};
csp_update_page(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| page_update | Option<PageUpdate> |
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Update a policy's configuration.
let cfg = &Configuration::default();
let params = CspUpdatePolicyParams {
// parameters
};
csp_update_policy(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| policy_id | String | Policy identifier | [required] | |
| policy_update | Option<PolicyUpdate> |
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Update a script's authorization status or justification.
let cfg = &Configuration::default();
let params = CspUpdateScriptParams {
// parameters
};
csp_update_script(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| page_id | String | Page identifier | [required] | |
| script_id | String | Script identifier | [required] | |
| script_update | Option<ScriptUpdate> |
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to README]
Update a website's configuration.
let cfg = &Configuration::default();
let params = CspUpdateWebsiteParams {
// parameters
};
csp_update_website(cfg, params)| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| website_id | String | Website identifier | [required] | |
| website_update | Option<WebsiteUpdate> |
- Content-Type: application/json
- Accept: application/json, application/problem+json