Skip to content

Commit e0dd5be

Browse files
author
Henry Smith
committed
Add endpoints depended on by site construction kit
1 parent aecfd34 commit e0dd5be

File tree

3 files changed

+185
-0
lines changed

3 files changed

+185
-0
lines changed

service/basekit.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name":"BaseKit REST API",
33
"includes":[
4+
"pages.json",
45
"sites.json",
56
"users.json"
67
]

service/pages.json

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
{
2+
"operations": {
3+
4+
"CreateSitePage": {
5+
"httpMethod": "POST",
6+
"uri": "/sites/{siteRef}/pages",
7+
"summary": "Create a page on a site",
8+
"parameters": {
9+
10+
"siteRef": {
11+
"description": "Site reference to be returned.",
12+
"location": "uri",
13+
"required": true,
14+
"type": "integer"
15+
},
16+
17+
"pageUrl": {
18+
"description": "Page URL",
19+
"location": "json",
20+
"required": true,
21+
"type": "string"
22+
},
23+
24+
"seo_title": {
25+
"description": "Seo title of the page",
26+
"location": "json",
27+
"required": true,
28+
"type": "string"
29+
},
30+
31+
"status": {
32+
"default": "active",
33+
"description": "Controls the page visibility when publishing a site",
34+
"enum": [
35+
"active",
36+
"draft",
37+
"inactive"
38+
],
39+
"location": "json",
40+
"required": true,
41+
"type": "string"
42+
},
43+
44+
"title": {
45+
"description": "Title of the page",
46+
"location": "json",
47+
"required": true,
48+
"type": "string"
49+
},
50+
51+
"type": {
52+
"default": "page",
53+
"description": "The type of page to be created",
54+
"enum": [
55+
"folder",
56+
"page",
57+
"error-page",
58+
"index",
59+
"home",
60+
"error-404",
61+
"list",
62+
"single"
63+
],
64+
"location": "json",
65+
"required": true,
66+
"type": "string"
67+
}
68+
69+
}
70+
},
71+
72+
"UpdateSitepage": {
73+
"httpMethod": "PUT",
74+
"uri": "/sites/{siteRef}/pages/{pageRef}",
75+
"summary": "Update a page of a site",
76+
"parameters": {
77+
78+
"siteRef": {
79+
"description": "Site reference.",
80+
"location": "uri",
81+
"required": true,
82+
"type": "integer"
83+
},
84+
85+
"pageRef": {
86+
"description": "Page reference to be updated.",
87+
"location": "uri",
88+
"required": true,
89+
"type": "integer"
90+
},
91+
92+
"pageUrl": {
93+
"description": "Page URL",
94+
"location": "json",
95+
"required": false,
96+
"type": "string"
97+
},
98+
99+
"status": {
100+
"default": "active",
101+
"description": "Controls the page visibility when publishing a site",
102+
"enum": [
103+
"active",
104+
"draft",
105+
"inactive"
106+
],
107+
"location": "json",
108+
"required": true,
109+
"type": "string"
110+
},
111+
112+
"type": {
113+
"description": "Page type can be one of the following: page,error-page,index,home,error-404,list,single",
114+
"location": "json",
115+
"required": false,
116+
"type": "string"
117+
}
118+
}
119+
},
120+
121+
"Addwidgettopage": {
122+
"httpMethod": "POST",
123+
"uri": "/sites/{siteRef}/pages/{pageRef}/widgets",
124+
"summary": "Add a widget to a page",
125+
"parameters": {
126+
127+
"siteRef": {
128+
"description": "Site reference to retrieve site.",
129+
"location": "uri",
130+
"required": true,
131+
"type": "integer"
132+
},
133+
134+
"pageRef": {
135+
"description": "Page reference to retrieve page.",
136+
"location": "uri",
137+
"required": true,
138+
"type": "integer"
139+
}
140+
141+
}
142+
}
143+
144+
}
145+
}

service/sites.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,45 @@
3939
"type": "string"
4040
}
4141

42+
}
43+
},
44+
45+
"MapDomain": {
46+
"httpMethod": "POST",
47+
"uri": "/sites/{siteRef}/domains",
48+
"summary": "Map the specified domain to the site. The site must be accessible by the caller.",
49+
"parameters": {
50+
51+
"siteRef": {
52+
"description": "Map a domain to this site.",
53+
"location": "uri",
54+
"required": true,
55+
"type": "integer"
56+
},
57+
58+
"domain": {
59+
"description": "Domain to be mapped to the site, including subdomain e.g. subdomain.domain.tld.",
60+
"location": "json",
61+
"required": false,
62+
"type": "string"
63+
}
64+
65+
}
66+
},
67+
68+
"PublishSite": {
69+
"httpMethod": "POST",
70+
"uri": "/sites/{siteRef}/publish",
71+
"summary": "Publish the latest version of this site to make it available live on its mapped domains.",
72+
"parameters": {
73+
74+
"siteRef": {
75+
"description": "Site reference to be published.",
76+
"location": "uri",
77+
"required": true,
78+
"type": "integer"
79+
}
80+
4281
}
4382
}
4483

0 commit comments

Comments
 (0)