IOrganizationCspDirectivesService
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Service for managing Content Security Policy directives of the organization.
export interface IOrganizationCspDirectivesService
Methods
Method | Description |
|---|---|
(ALPHA) Create a CSP directive. | |
(ALPHA) Delete a CSP directive. | |
(ALPHA) Get CSP directive by its name. | |
(ALPHA) Get all CSP directives of the organization. | |
(ALPHA) Replace the sources of an existing CSP directive. |
Method details
IOrganizationCspDirectivesService.create()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Create a CSP directive.
create(directive: ICspDirective): Promise<ICspDirective>;
Parameters
Parameter | Type | Description |
|---|---|---|
directive | directive to create |
Returns
Promise<ICspDirective>
IOrganizationCspDirectivesService.delete()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Delete a CSP directive.
delete(id: string): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | name of the directive |
Returns
Promise<void>
IOrganizationCspDirectivesService.get()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Get CSP directive by its name.
get(id: string): Promise<ICspDirective>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | name of the directive |
Returns
Promise<ICspDirective>
IOrganizationCspDirectivesService.getAll()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Get all CSP directives of the organization.
getAll(): Promise<ICspDirective[]>;
Returns
Promise<ICspDirective[]>
IOrganizationCspDirectivesService.update()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Replace the sources of an existing CSP directive.
update(directive: ICspDirective): Promise<ICspDirective>;
Parameters
Parameter | Type | Description |
|---|---|---|
directive | full directive; |
Returns
Promise<ICspDirective>