workarea-api 4.5.0 → 4.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/Gemfile +1 -3
- data/Rakefile +8 -9
- data/doc/api/admin/email_signups/showing_an_email_signup_by_email.json +47 -0
- data/doc/api/admin/email_signups/showing_an_email_signup_by_id.json +47 -0
- data/doc/api/admin/global_functionality/dealing_with_locales.json +86 -0
- data/doc/api/admin/global_functionality/filtering_by_created_at_time_stamp.json +56 -0
- data/doc/api/admin/global_functionality/filtering_by_updated_time_stamp.json +56 -0
- data/doc/api/admin/global_functionality/paging_results.json +51 -0
- data/doc/api/admin/global_functionality/retrieving_addtional_pages_of_results.json +51 -0
- data/doc/api/admin/global_functionality/sorting_results.json +56 -0
- data/doc/api/admin/orders/viewing_orders_by_date_range.json +76 -0
- data/doc/api/admin/users/showing_a_user_by_email.json +47 -0
- data/doc/api/admin/users/showing_a_user_by_id.json +47 -0
- data/lib/tasks/docs.rake +20 -0
- data/lib/workarea/api/version.rb +1 -1
- metadata +18 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1686c119997487d87ea67d1d54ddd49603ee64ff4926c3873399dded8d566ec7
|
4
|
+
data.tar.gz: 574f4086eb62ae229839b4d5990985d23cadcc2499b0d779e13954e9ecc8d3d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 620d2fe120def4417e167c068a1a7589e3871c40f05100fdfd4827c5cdc35a66be583fc0c6bd26ed2c3afa43ab6667e9831a4f1ce8112a58462fffb56a6dbf7b
|
7
|
+
data.tar.gz: cfc7d8bcb9380fdc4ba1d28513d93ceb30604442f00fa190c891ad92523d16836f7fef34eb955bd4f589a838f759ad3559ab8ee3ffc9eeaaa5f34e7799dfcf66
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,34 @@
|
|
1
|
+
Workarea Api 4.5.2 (2020-01-07)
|
2
|
+
--------------------------------------------------------------------------------
|
3
|
+
|
4
|
+
* Fix Docs Generator Task Name
|
5
|
+
|
6
|
+
The task name `workarea:api:generate_docs` wasn't able to load the
|
7
|
+
environment like the rest of the `workarea:test` tasks because it wasn't
|
8
|
+
in the correct Rake namespace. This is due to a hack in core that
|
9
|
+
configures the Rake environment such that custom Rake tasks for testing
|
10
|
+
are possible. Change the task name to `workarea:test:api_docs` to take
|
11
|
+
advantage of this hack so the tests will run properly.
|
12
|
+
|
13
|
+
API-4
|
14
|
+
Tom Scott
|
15
|
+
|
16
|
+
* Add Rake Task For Generating API Documentation
|
17
|
+
|
18
|
+
The `workarea:api:docs` task will generate all API documentation for all
|
19
|
+
plugins without the need to set environment variables. Developers should
|
20
|
+
run this task and commit the results in `doc/api` in order to deploy API
|
21
|
+
documentation changes to a server.
|
22
|
+
|
23
|
+
API-4
|
24
|
+
Tom Scott
|
25
|
+
|
26
|
+
* Fix rakefile
|
27
|
+
|
28
|
+
Curt Howard
|
29
|
+
|
30
|
+
|
31
|
+
|
1
32
|
Workarea Api 4.5.0 (2019-11-26)
|
2
33
|
--------------------------------------------------------------------------------
|
3
34
|
|
data/Gemfile
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
-
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
2
|
|
4
3
|
# Declare your gem's dependencies in api.gemspec.
|
5
4
|
# Bundler will treat runtime dependencies like base dependencies, and
|
@@ -18,5 +17,4 @@ gemspec
|
|
18
17
|
gem 'workarea-api-admin', path: 'admin'
|
19
18
|
gem 'workarea-api-storefront', path: 'storefront'
|
20
19
|
|
21
|
-
|
22
|
-
gem 'workarea', github: 'workarea-commerce/workarea'
|
20
|
+
gem 'workarea', git: 'https://github.com/workarea-commerce/workarea.git', branch: 'v3.5-stable'
|
data/Rakefile
CHANGED
@@ -77,19 +77,18 @@ task :release do
|
|
77
77
|
Rake::Task['workarea:changelog'].execute
|
78
78
|
system 'git add CHANGELOG.md'
|
79
79
|
system 'git commit -m "Update CHANGELOG"'
|
80
|
-
system 'git push origin HEAD'
|
81
80
|
|
82
81
|
#
|
83
82
|
# Build documentation
|
84
83
|
#
|
85
84
|
#
|
86
|
-
system <<~COMMAND
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
COMMAND
|
85
|
+
#system <<~COMMAND
|
86
|
+
# (cd admin && GENERATE_API_DOCS=true bin/rails test) &&
|
87
|
+
# (cd storefront && GENERATE_API_DOCS=true bin/rails test) &&
|
88
|
+
# git add doc/ &&
|
89
|
+
# git commit -am "Update documentation" &&
|
90
|
+
# git push origin HEAD
|
91
|
+
#COMMAND
|
93
92
|
|
94
93
|
#
|
95
94
|
# Build gem files
|
@@ -116,7 +115,7 @@ task :release do
|
|
116
115
|
system "gem push workarea-api-#{Workarea::Api::VERSION}.gem --host #{host}"
|
117
116
|
system 'Tagging git...'
|
118
117
|
system "git tag -a v#{Workarea::Api::VERSION} -m 'Tagging #{Workarea::Api::VERSION}'"
|
119
|
-
system 'git push --tags'
|
118
|
+
system 'git push origin HEAD --follow-tags'
|
120
119
|
|
121
120
|
#
|
122
121
|
# Clean up
|
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
|
4
|
+
],
|
5
|
+
"response_fields": [
|
6
|
+
|
7
|
+
],
|
8
|
+
"requests": [
|
9
|
+
{
|
10
|
+
"request_headers": {
|
11
|
+
},
|
12
|
+
"request_query_parameters": {
|
13
|
+
},
|
14
|
+
"response_headers": {
|
15
|
+
"X-Frame-Options": "SAMEORIGIN",
|
16
|
+
"X-XSS-Protection": "1; mode=block",
|
17
|
+
"X-Content-Type-Options": "nosniff",
|
18
|
+
"X-Download-Options": "noopen",
|
19
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
20
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
21
|
+
"Content-Type": "application/json; charset=utf-8",
|
22
|
+
"X-Requested-With": "",
|
23
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
24
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:38:36 GMT",
|
25
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
26
|
+
"X-Request-Id": "4acea774-f9f6-4b3b-8db5-43a5736ee67a",
|
27
|
+
"X-Runtime": "0.004993",
|
28
|
+
"X-Workarea-Segments": "",
|
29
|
+
"Expires": "0",
|
30
|
+
"Content-Length": "159"
|
31
|
+
},
|
32
|
+
"request_method": "GET",
|
33
|
+
"request_path": "/api/admin/email_signups/test%2540workarea%252Ecom",
|
34
|
+
"request_body": null,
|
35
|
+
"request_content_type": null,
|
36
|
+
"response_status": 200,
|
37
|
+
"response_status_text": "OK",
|
38
|
+
"response_body": "{\n \"email_signup\": {\n \"_id\": \"5dddc58c1241594254075921\",\n \"created_at\": \"2019-11-27T00:38:36.712Z\",\n \"email\": \"test@workarea.com\",\n \"updated_at\": \"2019-11-27T00:38:36.712Z\"\n }\n}",
|
39
|
+
"response_content_type": "application/json",
|
40
|
+
"curl": "curl -g \"https://www.example.com/api/admin/email_signups/test%2540workarea%252Ecom\" -X GET "
|
41
|
+
}
|
42
|
+
],
|
43
|
+
"resource": "Email Signups",
|
44
|
+
"description": "Showing an email signup by email",
|
45
|
+
"route": "/api/admin/email_signups/:email",
|
46
|
+
"http_method": "GET"
|
47
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
|
4
|
+
],
|
5
|
+
"response_fields": [
|
6
|
+
|
7
|
+
],
|
8
|
+
"requests": [
|
9
|
+
{
|
10
|
+
"request_headers": {
|
11
|
+
},
|
12
|
+
"request_query_parameters": {
|
13
|
+
},
|
14
|
+
"response_headers": {
|
15
|
+
"X-Frame-Options": "SAMEORIGIN",
|
16
|
+
"X-XSS-Protection": "1; mode=block",
|
17
|
+
"X-Content-Type-Options": "nosniff",
|
18
|
+
"X-Download-Options": "noopen",
|
19
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
20
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
21
|
+
"Content-Type": "application/json; charset=utf-8",
|
22
|
+
"X-Requested-With": "",
|
23
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
24
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:38:34 GMT",
|
25
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
26
|
+
"X-Request-Id": "22f808b3-03bd-40ec-9d65-b0bf5f0e2344",
|
27
|
+
"X-Runtime": "0.004250",
|
28
|
+
"X-Workarea-Segments": "",
|
29
|
+
"Expires": "0",
|
30
|
+
"Content-Length": "169"
|
31
|
+
},
|
32
|
+
"request_method": "GET",
|
33
|
+
"request_path": "/api/admin/email_signups/5dddc58a1241594254075916",
|
34
|
+
"request_body": null,
|
35
|
+
"request_content_type": null,
|
36
|
+
"response_status": 200,
|
37
|
+
"response_status_text": "OK",
|
38
|
+
"response_body": "{\n \"email_signup\": {\n \"_id\": \"5dddc58a1241594254075916\",\n \"created_at\": \"2019-11-27T00:38:34.411Z\",\n \"email\": \"email-signup-3@workarea.com\",\n \"updated_at\": \"2019-11-27T00:38:34.411Z\"\n }\n}",
|
39
|
+
"response_content_type": "application/json",
|
40
|
+
"curl": "curl -g \"https://www.example.com/api/admin/email_signups/5dddc58a1241594254075916\" -X GET "
|
41
|
+
}
|
42
|
+
],
|
43
|
+
"resource": "Email Signups",
|
44
|
+
"description": "Showing an email signup by ID",
|
45
|
+
"route": "/api/admin/email_signups/:id",
|
46
|
+
"http_method": "GET"
|
47
|
+
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
{
|
4
|
+
"name": "locale",
|
5
|
+
"description": "I18n locale key"
|
6
|
+
}
|
7
|
+
],
|
8
|
+
"response_fields": [
|
9
|
+
|
10
|
+
],
|
11
|
+
"requests": [
|
12
|
+
{
|
13
|
+
"request_headers": {
|
14
|
+
},
|
15
|
+
"request_query_parameters": {
|
16
|
+
"locale": "en"
|
17
|
+
},
|
18
|
+
"response_headers": {
|
19
|
+
"X-Frame-Options": "SAMEORIGIN",
|
20
|
+
"X-XSS-Protection": "1; mode=block",
|
21
|
+
"X-Content-Type-Options": "nosniff",
|
22
|
+
"X-Download-Options": "noopen",
|
23
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
24
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
25
|
+
"Content-Type": "application/json; charset=utf-8",
|
26
|
+
"X-Requested-With": "",
|
27
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
28
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:46:19 GMT",
|
29
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
30
|
+
"X-Request-Id": "023113ef-7b7b-4f80-91e1-868e6f568b60",
|
31
|
+
"X-Runtime": "0.009481",
|
32
|
+
"X-Workarea-Segments": "",
|
33
|
+
"Expires": "0",
|
34
|
+
"Content-Length": "741"
|
35
|
+
},
|
36
|
+
"request_method": "GET",
|
37
|
+
"request_path": "/api/admin/products?locale=en",
|
38
|
+
"request_body": null,
|
39
|
+
"request_content_type": null,
|
40
|
+
"response_status": 200,
|
41
|
+
"response_status_text": "OK",
|
42
|
+
"response_body": "{\n \"products\": [\n {\n \"_id\": \"AE9C99D2EC\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:19.439Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:19.723Z\",\n \"meta_description\": null,\n \"name\": \"Test Product\",\n \"purchasable\": true,\n \"slug\": \"test-product\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:19.439Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc75b124159425407656c\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n }\n ]\n}",
|
43
|
+
"response_content_type": "application/json",
|
44
|
+
"curl": "curl -g \"https://www.example.com/api/admin/products?locale=en\" -X GET "
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"request_headers": {
|
48
|
+
"Cookie": "_dummy_session=SXV2VGtpUWpKMDVEenlJMnFBMUF3OUFnSXlCWTJGWEdTOWxYc2V2V1pqay9mYTBxN2dKNlRTRHBMWnQ3eDcyNXY5eTJsU2JFcEVIRjRYTXRMZUN4S1E9PS0tWlNMVmk3TE1hb1RXV2xaeiszMWNCQT09--4f13d09184dcbcd1170e5dce525d31a2494759e8"
|
49
|
+
},
|
50
|
+
"request_query_parameters": {
|
51
|
+
"locale": "es"
|
52
|
+
},
|
53
|
+
"response_headers": {
|
54
|
+
"X-Frame-Options": "SAMEORIGIN",
|
55
|
+
"X-XSS-Protection": "1; mode=block",
|
56
|
+
"X-Content-Type-Options": "nosniff",
|
57
|
+
"X-Download-Options": "noopen",
|
58
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
59
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
60
|
+
"Content-Type": "application/json; charset=utf-8",
|
61
|
+
"X-Requested-With": "",
|
62
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
63
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:46:19 GMT",
|
64
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
65
|
+
"X-Request-Id": "17f28d89-710b-4ce9-b3a2-0f33a6522849",
|
66
|
+
"X-Runtime": "0.012967",
|
67
|
+
"X-Workarea-Segments": "",
|
68
|
+
"Expires": "0",
|
69
|
+
"Content-Length": "747"
|
70
|
+
},
|
71
|
+
"request_method": "GET",
|
72
|
+
"request_path": "/api/admin/products?locale=es",
|
73
|
+
"request_body": null,
|
74
|
+
"request_content_type": null,
|
75
|
+
"response_status": 200,
|
76
|
+
"response_status_text": "OK",
|
77
|
+
"response_body": "{\n \"products\": [\n {\n \"_id\": \"AE9C99D2EC\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:19.439Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:19.723Z\",\n \"meta_description\": null,\n \"name\": \"Producto de prueba\",\n \"purchasable\": true,\n \"slug\": \"test-product\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:19.439Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc75b124159425407656c\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n }\n ]\n}",
|
78
|
+
"response_content_type": "application/json",
|
79
|
+
"curl": "curl -g \"https://www.example.com/api/admin/products?locale=es\" -X GET \\\n\t-H \"Cookie: _dummy_session=SXV2VGtpUWpKMDVEenlJMnFBMUF3OUFnSXlCWTJGWEdTOWxYc2V2V1pqay9mYTBxN2dKNlRTRHBMWnQ3eDcyNXY5eTJsU2JFcEVIRjRYTXRMZUN4S1E9PS0tWlNMVmk3TE1hb1RXV2xaeiszMWNCQT09--4f13d09184dcbcd1170e5dce525d31a2494759e8\""
|
80
|
+
}
|
81
|
+
],
|
82
|
+
"resource": "Global Functionality",
|
83
|
+
"description": "Dealing with locales",
|
84
|
+
"route": "/api/admin/products",
|
85
|
+
"http_method": "GET"
|
86
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
{
|
4
|
+
"name": "created_at_starts_at",
|
5
|
+
"description": "Start of a created at date range"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"name": "created_at_ends_at",
|
9
|
+
"description": "End of a created at date range"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"response_fields": [
|
13
|
+
|
14
|
+
],
|
15
|
+
"requests": [
|
16
|
+
{
|
17
|
+
"request_headers": {
|
18
|
+
},
|
19
|
+
"request_query_parameters": {
|
20
|
+
"created_at_starts_at": "2019-11-26 00:46:21 UTC",
|
21
|
+
"created_at_ends_at": "2019-11-28 00:46:21 UTC"
|
22
|
+
},
|
23
|
+
"response_headers": {
|
24
|
+
"X-Frame-Options": "SAMEORIGIN",
|
25
|
+
"X-XSS-Protection": "1; mode=block",
|
26
|
+
"X-Content-Type-Options": "nosniff",
|
27
|
+
"X-Download-Options": "noopen",
|
28
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
29
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
30
|
+
"Content-Type": "application/json; charset=utf-8",
|
31
|
+
"X-Requested-With": "",
|
32
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
33
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:46:21 GMT",
|
34
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
35
|
+
"X-Request-Id": "feefc310-0167-4a05-b4bf-d45ac045c430",
|
36
|
+
"X-Runtime": "0.008774",
|
37
|
+
"X-Workarea-Segments": "",
|
38
|
+
"Expires": "0",
|
39
|
+
"Content-Length": "1470"
|
40
|
+
},
|
41
|
+
"request_method": "GET",
|
42
|
+
"request_path": "/api/admin/products?created_at_starts_at=2019-11-26+00%3A46%3A21+UTC&created_at_ends_at=2019-11-28+00%3A46%3A21+UTC",
|
43
|
+
"request_body": null,
|
44
|
+
"request_content_type": null,
|
45
|
+
"response_status": 200,
|
46
|
+
"response_status_text": "OK",
|
47
|
+
"response_body": "{\n \"products\": [\n {\n \"_id\": \"1E5662ED5D\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:21.761Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:21.951Z\",\n \"meta_description\": null,\n \"name\": \"Test Product\",\n \"purchasable\": true,\n \"slug\": \"test-product-1\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:21.761Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc75d1241594254076580\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n },\n {\n \"_id\": \"4FC73335DA\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:21.379Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:21.751Z\",\n \"meta_description\": null,\n \"name\": \"Test Product\",\n \"purchasable\": true,\n \"slug\": \"test-product\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:21.618Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc75d1241594254076577\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n }\n ]\n}",
|
48
|
+
"response_content_type": "application/json",
|
49
|
+
"curl": "curl -g \"https://www.example.com/api/admin/products?created_at_starts_at=2019-11-26+00%3A46%3A21+UTC&created_at_ends_at=2019-11-28+00%3A46%3A21+UTC\" -X GET "
|
50
|
+
}
|
51
|
+
],
|
52
|
+
"resource": "Global Functionality",
|
53
|
+
"description": "Filtering by created at time stamp",
|
54
|
+
"route": "/api/admin/products",
|
55
|
+
"http_method": "GET"
|
56
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
{
|
4
|
+
"name": "updated_at_starts_at",
|
5
|
+
"description": "Start of a last updated at date range"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"name": "updated_at_ends_at",
|
9
|
+
"description": "End of a last updated at date range"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"response_fields": [
|
13
|
+
|
14
|
+
],
|
15
|
+
"requests": [
|
16
|
+
{
|
17
|
+
"request_headers": {
|
18
|
+
},
|
19
|
+
"request_query_parameters": {
|
20
|
+
"updated_at_starts_at": "2019-11-26 00:46:27 UTC",
|
21
|
+
"updated_at_ends_at": "2019-11-28 00:46:27 UTC"
|
22
|
+
},
|
23
|
+
"response_headers": {
|
24
|
+
"X-Frame-Options": "SAMEORIGIN",
|
25
|
+
"X-XSS-Protection": "1; mode=block",
|
26
|
+
"X-Content-Type-Options": "nosniff",
|
27
|
+
"X-Download-Options": "noopen",
|
28
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
29
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
30
|
+
"Content-Type": "application/json; charset=utf-8",
|
31
|
+
"X-Requested-With": "",
|
32
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
33
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:46:27 GMT",
|
34
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
35
|
+
"X-Request-Id": "65d90f96-6dc3-45c1-91f8-fa7767d6fdd6",
|
36
|
+
"X-Runtime": "0.011043",
|
37
|
+
"X-Workarea-Segments": "",
|
38
|
+
"Expires": "0",
|
39
|
+
"Content-Length": "1470"
|
40
|
+
},
|
41
|
+
"request_method": "GET",
|
42
|
+
"request_path": "/api/admin/products?updated_at_starts_at=2019-11-26+00%3A46%3A27+UTC&updated_at_ends_at=2019-11-28+00%3A46%3A27+UTC",
|
43
|
+
"request_body": null,
|
44
|
+
"request_content_type": null,
|
45
|
+
"response_status": 200,
|
46
|
+
"response_status_text": "OK",
|
47
|
+
"response_body": "{\n \"products\": [\n {\n \"_id\": \"F2908E09C4\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:27.174Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:27.338Z\",\n \"meta_description\": null,\n \"name\": \"Test Product\",\n \"purchasable\": true,\n \"slug\": \"test-product-1\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:27.174Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc76312415942540765af\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n },\n {\n \"_id\": \"9D68374432\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:26.471Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:27.163Z\",\n \"meta_description\": null,\n \"name\": \"Test Product\",\n \"purchasable\": true,\n \"slug\": \"test-product\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:27.035Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc76212415942540765a6\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n }\n ]\n}",
|
48
|
+
"response_content_type": "application/json",
|
49
|
+
"curl": "curl -g \"https://www.example.com/api/admin/products?updated_at_starts_at=2019-11-26+00%3A46%3A27+UTC&updated_at_ends_at=2019-11-28+00%3A46%3A27+UTC\" -X GET "
|
50
|
+
}
|
51
|
+
],
|
52
|
+
"resource": "Global Functionality",
|
53
|
+
"description": "Filtering by updated time stamp",
|
54
|
+
"route": "/api/admin/products",
|
55
|
+
"http_method": "GET"
|
56
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
{
|
4
|
+
"name": "page",
|
5
|
+
"description": "Current page"
|
6
|
+
}
|
7
|
+
],
|
8
|
+
"response_fields": [
|
9
|
+
|
10
|
+
],
|
11
|
+
"requests": [
|
12
|
+
{
|
13
|
+
"request_headers": {
|
14
|
+
},
|
15
|
+
"request_query_parameters": {
|
16
|
+
"page": "1"
|
17
|
+
},
|
18
|
+
"response_headers": {
|
19
|
+
"X-Frame-Options": "SAMEORIGIN",
|
20
|
+
"X-XSS-Protection": "1; mode=block",
|
21
|
+
"X-Content-Type-Options": "nosniff",
|
22
|
+
"X-Download-Options": "noopen",
|
23
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
24
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
25
|
+
"Content-Type": "application/json; charset=utf-8",
|
26
|
+
"X-Requested-With": "",
|
27
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
28
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:46:16 GMT",
|
29
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
30
|
+
"X-Request-Id": "c41640b5-39f4-4e7a-a996-c25f16bbc7fa",
|
31
|
+
"X-Runtime": "0.009128",
|
32
|
+
"X-Workarea-Segments": "",
|
33
|
+
"Expires": "0",
|
34
|
+
"Content-Length": "1470"
|
35
|
+
},
|
36
|
+
"request_method": "GET",
|
37
|
+
"request_path": "/api/admin/products?page=1",
|
38
|
+
"request_body": null,
|
39
|
+
"request_content_type": null,
|
40
|
+
"response_status": 200,
|
41
|
+
"response_status_text": "OK",
|
42
|
+
"response_body": "{\n \"products\": [\n {\n \"_id\": \"FE90881E79\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:16.183Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:16.351Z\",\n \"meta_description\": null,\n \"name\": \"Test Product\",\n \"purchasable\": true,\n \"slug\": \"test-product-1\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:16.183Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc7581241594254076551\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n },\n {\n \"_id\": \"0C006008AA\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:15.798Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:16.176Z\",\n \"meta_description\": null,\n \"name\": \"Test Product\",\n \"purchasable\": true,\n \"slug\": \"test-product\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:16.045Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc7571241594254076548\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n }\n ]\n}",
|
43
|
+
"response_content_type": "application/json",
|
44
|
+
"curl": "curl -g \"https://www.example.com/api/admin/products?page=1\" -X GET "
|
45
|
+
}
|
46
|
+
],
|
47
|
+
"resource": "Global Functionality",
|
48
|
+
"description": "Paging results",
|
49
|
+
"route": "/api/admin/products",
|
50
|
+
"http_method": "GET"
|
51
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
{
|
4
|
+
"name": "page",
|
5
|
+
"description": "Current page"
|
6
|
+
}
|
7
|
+
],
|
8
|
+
"response_fields": [
|
9
|
+
|
10
|
+
],
|
11
|
+
"requests": [
|
12
|
+
{
|
13
|
+
"request_headers": {
|
14
|
+
},
|
15
|
+
"request_query_parameters": {
|
16
|
+
"page": "2"
|
17
|
+
},
|
18
|
+
"response_headers": {
|
19
|
+
"X-Frame-Options": "SAMEORIGIN",
|
20
|
+
"X-XSS-Protection": "1; mode=block",
|
21
|
+
"X-Content-Type-Options": "nosniff",
|
22
|
+
"X-Download-Options": "noopen",
|
23
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
24
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
25
|
+
"Content-Type": "application/json; charset=utf-8",
|
26
|
+
"X-Requested-With": "",
|
27
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
28
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:46:25 GMT",
|
29
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
30
|
+
"X-Request-Id": "41ee8aa9-4a90-4dca-a63f-bb9de95a757d",
|
31
|
+
"X-Runtime": "0.006204",
|
32
|
+
"X-Workarea-Segments": "",
|
33
|
+
"Expires": "0",
|
34
|
+
"Content-Length": "15"
|
35
|
+
},
|
36
|
+
"request_method": "GET",
|
37
|
+
"request_path": "/api/admin/products?page=2",
|
38
|
+
"request_body": null,
|
39
|
+
"request_content_type": null,
|
40
|
+
"response_status": 200,
|
41
|
+
"response_status_text": "OK",
|
42
|
+
"response_body": "{\n \"products\": [\n\n ]\n}",
|
43
|
+
"response_content_type": "application/json",
|
44
|
+
"curl": "curl -g \"https://www.example.com/api/admin/products?page=2\" -X GET "
|
45
|
+
}
|
46
|
+
],
|
47
|
+
"resource": "Global Functionality",
|
48
|
+
"description": "Retrieving addtional pages of results",
|
49
|
+
"route": "/api/admin/products",
|
50
|
+
"http_method": "GET"
|
51
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
{
|
4
|
+
"name": "sort_by",
|
5
|
+
"description": "Field on which to sort (see responses for possible values)"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"name": "sort_direction",
|
9
|
+
"description": "Direction to sort (asc or desc)"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"response_fields": [
|
13
|
+
|
14
|
+
],
|
15
|
+
"requests": [
|
16
|
+
{
|
17
|
+
"request_headers": {
|
18
|
+
},
|
19
|
+
"request_query_parameters": {
|
20
|
+
"sort_by": "created_at",
|
21
|
+
"sort_direction": "desc"
|
22
|
+
},
|
23
|
+
"response_headers": {
|
24
|
+
"X-Frame-Options": "SAMEORIGIN",
|
25
|
+
"X-XSS-Protection": "1; mode=block",
|
26
|
+
"X-Content-Type-Options": "nosniff",
|
27
|
+
"X-Download-Options": "noopen",
|
28
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
29
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
30
|
+
"Content-Type": "application/json; charset=utf-8",
|
31
|
+
"X-Requested-With": "",
|
32
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
33
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:46:18 GMT",
|
34
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
35
|
+
"X-Request-Id": "34fe40ca-9ab3-48d9-80cd-ef78c950695c",
|
36
|
+
"X-Runtime": "0.008967",
|
37
|
+
"X-Workarea-Segments": "",
|
38
|
+
"Expires": "0",
|
39
|
+
"Content-Length": "1470"
|
40
|
+
},
|
41
|
+
"request_method": "GET",
|
42
|
+
"request_path": "/api/admin/products?sort_by=created_at&sort_direction=desc",
|
43
|
+
"request_body": null,
|
44
|
+
"request_content_type": null,
|
45
|
+
"response_status": 200,
|
46
|
+
"response_status_text": "OK",
|
47
|
+
"response_body": "{\n \"products\": [\n {\n \"_id\": \"FA159F10A9\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:17.924Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:18.118Z\",\n \"meta_description\": null,\n \"name\": \"Test Product\",\n \"purchasable\": true,\n \"slug\": \"test-product-1\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:17.924Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc7591241594254076563\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n },\n {\n \"_id\": \"2FD88D2901\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"browser_title\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:46:17.551Z\",\n \"customizations\": null,\n \"default_category_id\": null,\n \"description\": null,\n \"details\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n },\n \"digital\": false,\n \"filters\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n },\n \"last_indexed_at\": \"2019-11-27T00:46:17.915Z\",\n \"meta_description\": null,\n \"name\": \"Test Product\",\n \"purchasable\": true,\n \"slug\": \"test-product\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"template\": \"generic\",\n \"updated_at\": \"2019-11-27T00:46:17.791Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc759124159425407655a\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"details\": {\n },\n \"name\": \"SKU\",\n \"position\": 0,\n \"sku\": \"SKU\",\n \"updated_at\": null\n }\n ]\n }\n ]\n}",
|
48
|
+
"response_content_type": "application/json",
|
49
|
+
"curl": "curl -g \"https://www.example.com/api/admin/products?sort_by=created_at&sort_direction=desc\" -X GET "
|
50
|
+
}
|
51
|
+
],
|
52
|
+
"resource": "Global Functionality",
|
53
|
+
"description": "Sorting results",
|
54
|
+
"route": "/api/admin/products",
|
55
|
+
"http_method": "GET"
|
56
|
+
}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
{
|
4
|
+
"name": "page",
|
5
|
+
"description": "Current page"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"name": "sort_by",
|
9
|
+
"description": "Field on which to sort (see responses for possible values)"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"name": "sort_direction",
|
13
|
+
"description": "Direction to sort (asc or desc)"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"name": "placed_at_greater_than",
|
17
|
+
"description": "Start of a placed_at date range"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"name": "placed_at_less_than",
|
21
|
+
"description": "End of a placed_at date range"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"name": "email",
|
25
|
+
"description": "Email address on the order"
|
26
|
+
}
|
27
|
+
],
|
28
|
+
"response_fields": [
|
29
|
+
|
30
|
+
],
|
31
|
+
"requests": [
|
32
|
+
{
|
33
|
+
"request_headers": {
|
34
|
+
},
|
35
|
+
"request_query_parameters": {
|
36
|
+
"page": "1",
|
37
|
+
"sort_by": "created_at",
|
38
|
+
"sort_direction": "desc",
|
39
|
+
"placed_at_greater_than": "2019-11-12 00:36:34 UTC",
|
40
|
+
"placed_at_less_than": "2019-11-14 00:36:34 UTC",
|
41
|
+
"email": "test@workarea.com"
|
42
|
+
},
|
43
|
+
"response_headers": {
|
44
|
+
"X-Frame-Options": "SAMEORIGIN",
|
45
|
+
"X-XSS-Protection": "1; mode=block",
|
46
|
+
"X-Content-Type-Options": "nosniff",
|
47
|
+
"X-Download-Options": "noopen",
|
48
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
49
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
50
|
+
"Content-Type": "application/json; charset=utf-8",
|
51
|
+
"X-Requested-With": "",
|
52
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
53
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:36:34 GMT",
|
54
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
55
|
+
"X-Request-Id": "277b837f-eedf-40aa-bbdf-070c79757e3f",
|
56
|
+
"X-Runtime": "0.012115",
|
57
|
+
"X-Workarea-Segments": "",
|
58
|
+
"Expires": "0",
|
59
|
+
"Content-Length": "2550"
|
60
|
+
},
|
61
|
+
"request_method": "GET",
|
62
|
+
"request_path": "/api/admin/orders?page=1&sort_by=created_at&sort_direction=desc&placed_at_greater_than=2019-11-12+00%3A36%3A34+UTC&placed_at_less_than=2019-11-14+00%3A36%3A34+UTC&email=test%40workarea.com",
|
63
|
+
"request_body": null,
|
64
|
+
"request_content_type": null,
|
65
|
+
"response_status": 200,
|
66
|
+
"response_status_text": "OK",
|
67
|
+
"response_body": "{\n \"orders\": [\n {\n \"_id\": \"10002\",\n \"canceled_at\": null,\n \"checkout_by_id\": null,\n \"checkout_started_at\": null,\n \"copied_from_id\": null,\n \"created_at\": \"2019-11-27T00:36:31.470Z\",\n \"discount_ids\": [\n\n ],\n \"email\": \"test@workarea.com\",\n \"fraud_decided_at\": \"2019-11-27T00:36:33.858Z\",\n \"fraud_decision\": {\n \"_id\": \"5dddc511124159425407555b\",\n \"analyzer\": \"Workarea::Checkout::Fraud::TestAnalyzer\",\n \"created_at\": null,\n \"decision\": \"no_decision\",\n \"message\": \"Workarea default fraud check. Automatic no decision.\",\n \"response\": null,\n \"updated_at\": null\n },\n \"fraud_suspected_at\": null,\n \"ip_address\": null,\n \"items\": [\n {\n \"_id\": \"5dddc50f12415942540754bd\",\n \"category_ids\": [\n\n ],\n \"created_at\": \"2019-11-27T00:36:31.470Z\",\n \"customizations\": {\n },\n \"discountable\": true,\n \"free_gift\": false,\n \"fulfillment\": \"shipping\",\n \"price_adjustments\": [\n {\n \"_id\": \"5dddc5111241594254075559\",\n \"amount\": {\n \"cents\": 1000.0,\n \"currency_iso\": \"USD\"\n },\n \"calculator\": \"Workarea::Pricing::Calculators::ItemCalculator\",\n \"created_at\": null,\n \"data\": {\n \"on_sale\": false,\n \"original_price\": 5.0,\n \"tax_code\": null\n },\n \"description\": \"Item Subtotal\",\n \"price\": \"item\",\n \"quantity\": 2,\n \"updated_at\": null\n }\n ],\n \"product_attributes\": {\n \"_id\": \"6FFBF36DA3\",\n \"tags\": [\n\n ],\n \"active_segment_ids\": {\n \"en\": [\n\n ]\n },\n \"active\": {\n \"en\": true\n },\n \"subscribed_user_ids\": [\n\n ],\n \"details\": {\n \"en\": {\n \"Material\": [\n \"Cotton\"\n ],\n \"Style\": [\n \"12345\"\n ]\n }\n },\n \"filters\": {\n \"en\": {\n \"Material\": \"Cotton\",\n \"Style\": \"12345\"\n }\n },\n \"template\": \"generic\",\n \"purchasable\": true,\n \"name\": {\n \"en\": \"Test Product\"\n },\n \"digital\": false,\n \"slug\": \"test-product\",\n \"updated_at\": \"2019-11-27T00:36:30.777Z\",\n \"created_at\": \"2019-11-27T00:35:55.353Z\",\n \"variants\": [\n {\n \"_id\": \"5dddc4eb124159425407528a\",\n \"active_segment_ids\": {\n \"en\": [\n\n ]\n },\n \"active\": {\n \"en\": true\n },\n \"details\": {\n \"en\": {\n }\n },\n \"sku\": \"SKU\",\n \"name\": {\n \"en\": \"SKU\"\n },\n \"position\": 0\n }\n ],\n \"last_indexed_at\": \"2019-11-27T00:36:31.263Z\"\n },\n \"product_id\": \"6FFBF36DA3\",\n \"quantity\": 2,\n \"sku\": \"SKU\",\n \"total_price\": {\n \"cents\": 1000.0,\n \"currency_iso\": \"USD\"\n },\n \"total_value\": {\n \"cents\": 1000.0,\n \"currency_iso\": \"USD\"\n },\n \"updated_at\": \"2019-11-27T00:36:31.470Z\",\n \"via\": null\n }\n ],\n \"lock_expires_at\": null,\n \"metrics_saved_at\": \"2019-11-27T00:36:34.488Z\",\n \"placed_at\": \"2019-11-13T00:36:30.756Z\",\n \"pricing_cache_key\": \"c128e650f1adc1387430c080e9192336dc9d3961\",\n \"promo_codes\": [\n\n ],\n \"reminded_at\": null,\n \"segment_ids\": [\n\n ],\n \"shipping_total\": {\n \"cents\": 100.0,\n \"currency_iso\": \"USD\"\n },\n \"source\": null,\n \"subscribed_user_ids\": [\n\n ],\n \"subtotal_price\": {\n \"cents\": 1000.0,\n \"currency_iso\": \"USD\"\n },\n \"tax_total\": {\n \"cents\": 0.0,\n \"currency_iso\": \"USD\"\n },\n \"token\": \"fXaAc58HTshaiNBauQBeNSe1\",\n \"total_price\": {\n \"cents\": 1100.0,\n \"currency_iso\": \"USD\"\n },\n \"total_value\": {\n \"cents\": 1000.0,\n \"currency_iso\": \"USD\"\n },\n \"updated_at\": \"2019-11-27T00:36:34.673Z\",\n \"user_activity_id\": null,\n \"user_agent\": null,\n \"user_id\": null\n }\n ]\n}",
|
68
|
+
"response_content_type": "application/json",
|
69
|
+
"curl": "curl -g \"https://www.example.com/api/admin/orders?page=1&sort_by=created_at&sort_direction=desc&placed_at_greater_than=2019-11-12+00%3A36%3A34+UTC&placed_at_less_than=2019-11-14+00%3A36%3A34+UTC&email=test%40workarea.com\" -X GET "
|
70
|
+
}
|
71
|
+
],
|
72
|
+
"resource": "Orders",
|
73
|
+
"description": "Viewing orders by date range",
|
74
|
+
"route": "/api/admin/orders",
|
75
|
+
"http_method": "GET"
|
76
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
|
4
|
+
],
|
5
|
+
"response_fields": [
|
6
|
+
|
7
|
+
],
|
8
|
+
"requests": [
|
9
|
+
{
|
10
|
+
"request_headers": {
|
11
|
+
},
|
12
|
+
"request_query_parameters": {
|
13
|
+
},
|
14
|
+
"response_headers": {
|
15
|
+
"X-Frame-Options": "SAMEORIGIN",
|
16
|
+
"X-XSS-Protection": "1; mode=block",
|
17
|
+
"X-Content-Type-Options": "nosniff",
|
18
|
+
"X-Download-Options": "noopen",
|
19
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
20
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
21
|
+
"Content-Type": "application/json; charset=utf-8",
|
22
|
+
"X-Requested-With": "",
|
23
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
24
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:43:25 GMT",
|
25
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
26
|
+
"X-Request-Id": "5c08b052-96a7-4bce-97ff-f0a98d475a7a",
|
27
|
+
"X-Runtime": "0.006035",
|
28
|
+
"X-Workarea-Segments": "",
|
29
|
+
"Expires": "0",
|
30
|
+
"Content-Length": "918"
|
31
|
+
},
|
32
|
+
"request_method": "GET",
|
33
|
+
"request_path": "/api/admin/users/test%2540workarea%252Ecom",
|
34
|
+
"request_body": null,
|
35
|
+
"request_content_type": null,
|
36
|
+
"response_status": 200,
|
37
|
+
"response_status_text": "OK",
|
38
|
+
"response_body": "{\n \"user\": {\n \"_id\": \"5dddc6ad1241594254076155\",\n \"admin\": false,\n \"api_access\": false,\n \"avatar_name\": null,\n \"avatar_uid\": null,\n \"can_publish_now\": null,\n \"can_restore\": null,\n \"catalog_access\": false,\n \"created_at\": \"2019-11-27T00:43:25.298Z\",\n \"created_by_id\": null,\n \"email\": \"test@workarea.com\",\n \"failed_login_count\": 0,\n \"first_name\": \"Ben\",\n \"help_admin\": false,\n \"ip_address\": null,\n \"last_impersonated_at\": null,\n \"last_impersonated_by_id\": null,\n \"last_login_at\": null,\n \"last_login_attempt_at\": null,\n \"last_name\": \"Crouse\",\n \"marketing_access\": false,\n \"orders_access\": false,\n \"orders_manager\": false,\n \"password_changed_at\": \"2019-11-27T00:43:25.298Z\",\n \"people_access\": false,\n \"permissions_manager\": false,\n \"releases_access\": false,\n \"reports_access\": false,\n \"search_access\": false,\n \"settings_access\": false,\n \"status_email_recipient\": false,\n \"store_access\": false,\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"token\": \"4kkQ435DM81yoHPimvZqrv43\",\n \"updated_at\": \"2019-11-27T00:43:25.298Z\",\n \"user_agent\": null\n }\n}",
|
39
|
+
"response_content_type": "application/json",
|
40
|
+
"curl": "curl -g \"https://www.example.com/api/admin/users/test%2540workarea%252Ecom\" -X GET "
|
41
|
+
}
|
42
|
+
],
|
43
|
+
"resource": "Users",
|
44
|
+
"description": "Showing a user by email",
|
45
|
+
"route": "/api/admin/users/:email",
|
46
|
+
"http_method": "GET"
|
47
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"parameters": [
|
3
|
+
|
4
|
+
],
|
5
|
+
"response_fields": [
|
6
|
+
|
7
|
+
],
|
8
|
+
"requests": [
|
9
|
+
{
|
10
|
+
"request_headers": {
|
11
|
+
},
|
12
|
+
"request_query_parameters": {
|
13
|
+
},
|
14
|
+
"response_headers": {
|
15
|
+
"X-Frame-Options": "SAMEORIGIN",
|
16
|
+
"X-XSS-Protection": "1; mode=block",
|
17
|
+
"X-Content-Type-Options": "nosniff",
|
18
|
+
"X-Download-Options": "noopen",
|
19
|
+
"X-Permitted-Cross-Domain-Policies": "none",
|
20
|
+
"Referrer-Policy": "strict-origin-when-cross-origin",
|
21
|
+
"Content-Type": "application/json; charset=utf-8",
|
22
|
+
"X-Requested-With": "",
|
23
|
+
"Vary": "X-Requested-With, X-Workarea-Segments",
|
24
|
+
"Last-Modified": "Wed, 27 Nov 2019 00:43:19 GMT",
|
25
|
+
"Cache-Control": "no-cache, no-store, must-revalidate",
|
26
|
+
"X-Request-Id": "93fab4cf-db5d-4f98-9083-220290b6bbac",
|
27
|
+
"X-Runtime": "0.006326",
|
28
|
+
"X-Workarea-Segments": "",
|
29
|
+
"Expires": "0",
|
30
|
+
"Content-Length": "921"
|
31
|
+
},
|
32
|
+
"request_method": "GET",
|
33
|
+
"request_path": "/api/admin/users/5dddc6a71241594254076132",
|
34
|
+
"request_body": null,
|
35
|
+
"request_content_type": null,
|
36
|
+
"response_status": 200,
|
37
|
+
"response_status_text": "OK",
|
38
|
+
"response_body": "{\n \"user\": {\n \"_id\": \"5dddc6a71241594254076132\",\n \"admin\": false,\n \"api_access\": false,\n \"avatar_name\": null,\n \"avatar_uid\": null,\n \"can_publish_now\": null,\n \"can_restore\": null,\n \"catalog_access\": false,\n \"created_at\": \"2019-11-27T00:43:19.863Z\",\n \"created_by_id\": null,\n \"email\": \"user249@workarea.com\",\n \"failed_login_count\": 0,\n \"first_name\": \"Ben\",\n \"help_admin\": false,\n \"ip_address\": null,\n \"last_impersonated_at\": null,\n \"last_impersonated_by_id\": null,\n \"last_login_at\": null,\n \"last_login_attempt_at\": null,\n \"last_name\": \"Crouse\",\n \"marketing_access\": false,\n \"orders_access\": false,\n \"orders_manager\": false,\n \"password_changed_at\": \"2019-11-27T00:43:19.863Z\",\n \"people_access\": false,\n \"permissions_manager\": false,\n \"releases_access\": false,\n \"reports_access\": false,\n \"search_access\": false,\n \"settings_access\": false,\n \"status_email_recipient\": false,\n \"store_access\": false,\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"token\": \"zvwpEYQ3KG5UuSpp3t1gZjAX\",\n \"updated_at\": \"2019-11-27T00:43:19.863Z\",\n \"user_agent\": null\n }\n}",
|
39
|
+
"response_content_type": "application/json",
|
40
|
+
"curl": "curl -g \"https://www.example.com/api/admin/users/5dddc6a71241594254076132\" -X GET "
|
41
|
+
}
|
42
|
+
],
|
43
|
+
"resource": "Users",
|
44
|
+
"description": "Showing a user by ID",
|
45
|
+
"route": "/api/admin/users/:id",
|
46
|
+
"http_method": "GET"
|
47
|
+
}
|
data/lib/tasks/docs.rake
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
load 'rails/test_unit/testing.rake'
|
2
|
+
|
3
|
+
namespace :workarea do
|
4
|
+
namespace :test do
|
5
|
+
desc 'Generate Workarea API Documentation'
|
6
|
+
task api_docs: :'workarea:prepare' do
|
7
|
+
roots = [Workarea::Core::Engine.root] +
|
8
|
+
Workarea::Plugin.installed.map(&:root) +
|
9
|
+
[Rails.root]
|
10
|
+
|
11
|
+
ENV['GENERATE_API_DOCS'] = 'true'
|
12
|
+
|
13
|
+
Rails::TestUnit::Runner.rake_run(
|
14
|
+
roots
|
15
|
+
.map { |r| FileList["#{r}/test/documentation/**/*_test.rb"] }
|
16
|
+
.reduce(&:+)
|
17
|
+
)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/workarea/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.5.
|
4
|
+
version: 4.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Crouse
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: workarea
|
@@ -37,28 +37,28 @@ dependencies:
|
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.5.
|
40
|
+
version: 4.5.2
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.5.
|
47
|
+
version: 4.5.2
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: workarea-api-admin
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.5.
|
54
|
+
version: 4.5.2
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 4.5.
|
61
|
+
version: 4.5.2
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: raddocs
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,10 +332,18 @@ files:
|
|
332
332
|
- doc/api/admin/discounts/updating_discounts.json
|
333
333
|
- doc/api/admin/email_signups/listing_email_signups.json
|
334
334
|
- doc/api/admin/email_signups/showing_an_email_signup.json
|
335
|
+
- doc/api/admin/email_signups/showing_an_email_signup_by_email.json
|
336
|
+
- doc/api/admin/email_signups/showing_an_email_signup_by_id.json
|
335
337
|
- doc/api/admin/fulfillment/listing_fulfillments.json
|
336
338
|
- doc/api/admin/fulfillment/marking_items_as_canceled.json
|
337
339
|
- doc/api/admin/fulfillment/marking_items_as_shipped.json
|
338
340
|
- doc/api/admin/fulfillment/showing_fulfillment.json
|
341
|
+
- doc/api/admin/global_functionality/dealing_with_locales.json
|
342
|
+
- doc/api/admin/global_functionality/filtering_by_created_at_time_stamp.json
|
343
|
+
- doc/api/admin/global_functionality/filtering_by_updated_time_stamp.json
|
344
|
+
- doc/api/admin/global_functionality/paging_results.json
|
345
|
+
- doc/api/admin/global_functionality/retrieving_addtional_pages_of_results.json
|
346
|
+
- doc/api/admin/global_functionality/sorting_results.json
|
339
347
|
- doc/api/admin/index.json
|
340
348
|
- doc/api/admin/inventory_skus/bulk_upserting_inventory_skus.json
|
341
349
|
- doc/api/admin/inventory_skus/creating_an_inventory_sku.json
|
@@ -356,6 +364,7 @@ files:
|
|
356
364
|
- doc/api/admin/navigation_taxonomy/updating_a_navigation_taxons.json
|
357
365
|
- doc/api/admin/orders/listing_orders.json
|
358
366
|
- doc/api/admin/orders/showing_an_order.json
|
367
|
+
- doc/api/admin/orders/viewing_orders_by_date_range.json
|
359
368
|
- doc/api/admin/pages/bulk_upserting_pages.json
|
360
369
|
- doc/api/admin/pages/creating_a_page.json
|
361
370
|
- doc/api/admin/pages/listing_pages.json
|
@@ -449,6 +458,8 @@ files:
|
|
449
458
|
- doc/api/admin/users/listing_users.json
|
450
459
|
- doc/api/admin/users/removing_a_user.json
|
451
460
|
- doc/api/admin/users/showing_a_user.json
|
461
|
+
- doc/api/admin/users/showing_a_user_by_email.json
|
462
|
+
- doc/api/admin/users/showing_a_user_by_id.json
|
452
463
|
- doc/api/admin/users/updating_a_user.json
|
453
464
|
- doc/api/admin/variants/creating_a_product_variant.json
|
454
465
|
- doc/api/admin/variants/listing_product_variants.json
|
@@ -514,6 +525,7 @@ files:
|
|
514
525
|
- doc/api/storefront/taxons/showing_a_taxon.json
|
515
526
|
- doc/api/storefront/validation_errors/checkout_validation_errors.json
|
516
527
|
- doc/api/storefront/validation_errors/general_validation_errors.json
|
528
|
+
- lib/tasks/docs.rake
|
517
529
|
- lib/workarea/api.rb
|
518
530
|
- lib/workarea/api/curl.rb
|
519
531
|
- lib/workarea/api/documentation.rb
|