Page
The Cursion CLI has 3 commands to work with the Page
object:
Command | Description |
---|---|
add-page | create a page |
get-pages | get one or more pages |
delete-page | delete a page |
Tips
For information about the Page
object, please see Page Overview.
Create a Page
add-page
This command will add a new Page
to the Site
associated with the passed id
. Once created, an Cursion will automatically initiate a Scan
for the new Page
.
The full command to create a Page
is the following:
cursion add-page <site_id> https://example.com/blog
View Full Output
✔ Success
{
'id': '2674ff9b-4eca-4f15-af01-1201b62c4e81',
'user': 'jane@example.com',
'site': '5ec5041a-bf5f-440c-a95b-1ae43c91da7d',
'page_url': 'https://example.com/blog',
'time_created': '2024-02-28T17:41:20.547487Z',
'info':{
'latest_scan': {'id': 'e6bfbf88-7b17-49ad-927e-36bf8d219fac', 'time_created': '2024-02-28 17:41:20.550683+00:00', 'time_completed': None},
'latest_test': {'id': None, 'time_created': None, 'time_completed': None, 'score': None},
'lighthouse': {'average': None, 'seo': None, 'pwa': None, 'crux': None, 'performance': None, 'accessibility': None, 'best_practices': None},
'yellowlab':{
'globalScore': None,
'pageWeight': None,
'requests': None,
'domComplexity': None,
'javascriptComplexity': None,
'badJavascript': None,
'jQuery': None,
'cssComplexity': None,
'badCSS': None,
'fonts': None,
'serverConfig': None
},
'status': {'health': None, 'badge': 'neutral', 'score': None}
},
'tags': None,
'account': 'a2eeccc6-e6ae-4db8-8c75-3304a80d63be'
}
Retrieve Pages
get-pages
This command will retrieve one or more Pages
associated with the passed --site-id=<site-id>
or --page-id=<page-id>
.
The full command to retrieve a Page
is the following:
cursion get-pages --site-id=<site_id>
View Full Output
✔ Success
{
'id': 'e7886fa0-e1d2-4ccc-82d8-0f2efe0baf06',
'user': 'jane@example.com',
'site': '135d2f34-9edf-439a-bfc5-5b47b625f2c8',
'page_url': 'https://example.com/checkout',
'time_created': '2024-02-20T23:51:43.240149Z',
'info': {
'status': {'badge': 'warning', 'score': 64.5, 'health': 'Okay'},
'yellowlab': {
'fonts': 41,
'badCSS': 55,
'jQuery': 100,
'requests': 98,
'pageWeight': 79,
'globalScore': 64,
'serverConfig': 76,
'badJavascript': 99,
'cssComplexity': 26,
'domComplexity': 97,
'javascriptComplexity': -49
},
'lighthouse': {'pwa': 38, 'seo': 82, 'crux': None, 'average': 65, 'performance': 31, 'accessibility': 96, 'best_practices': 78},
'latest_scan': {
'id': 'd0ea03ae-64f4-4a90-8922-0f953a13c94a',
'time_created': '2024-02-28 00:28:04.931270+00:00',
'time_completed': 'None'
},
'latest_test': {
'id': '0c62ca69-08dd-4619-8fde-28c31be6cee8',
'score': 99.17,
'time_created': '2024-02-26 22:39:59.084650+00:00',
'time_completed': '2024-02-26 22:40:00.203184'
}
},
'tags': [None],
'account': 'a2eeccc6-e6ae-4db8-8c75-3304a80d63be'
},
Delete a Page
delete-page
This command will delete a Page
and any associated Scans
, Tests
, Scahedules
, and Automations
.
The full command to delete a Page
is the following:
Caution
Please use caution with this command as it is irreversible.
cursion delete-page <page-id>
View Full Output
✔ Success
{'message': 'Page has been deleted'}