From 45a744fcf1d27d71c88fc520f0e0334a3bde4d9b Mon Sep 17 00:00:00 2001 From: cpluta <42399376+cpluta@users.noreply.github.com> Date: Wed, 23 Oct 2019 23:11:43 -0500 Subject: [PATCH 1/4] Update index.rst --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 179200e..5b4fe29 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,5 @@ ======= -Welcome +Welcome Test ======= -------------- From 386da62266919490fd106833f2059142b51268d4 Mon Sep 17 00:00:00 2001 From: cpluta <42399376+cpluta@users.noreply.github.com> Date: Wed, 23 Oct 2019 23:12:53 -0500 Subject: [PATCH 2/4] Update index.rst --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 5b4fe29..179200e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,5 @@ ======= -Welcome Test +Welcome ======= -------------- From 0559a80f79c1fbda7eb7bf2dd0a133634b444fa0 Mon Sep 17 00:00:00 2001 From: Chris Pluta Date: Thu, 31 Oct 2019 00:33:58 -0500 Subject: [PATCH 3/4] Adding new response code to endpoints and extending projection to include filter parameter --- docs/data/creating.rst | 3 +++ docs/data/deleting.rst | 3 +++ docs/data/projecting.rst | 15 +++++++++++++-- docs/data/retrieving.rst | 3 +++ docs/data/searching.rst | 5 ++++- docs/data/updating.rst | 3 +++ docs/intro/getting_started_csharp.rst | 12 ++++++++++++ docs/intro/getting_started_nodejs.rst | 14 +++++++++++++- docs/intro/getting_started_rest.rst | 14 +++++++++++++- 9 files changed, 67 insertions(+), 5 deletions(-) diff --git a/docs/data/creating.rst b/docs/data/creating.rst index 011e237..00b0ad7 100644 --- a/docs/data/creating.rst +++ b/docs/data/creating.rst @@ -115,5 +115,8 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to create meshes or specific mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. \ No newline at end of file diff --git a/docs/data/deleting.rst b/docs/data/deleting.rst index 92d8c8d..91027e7 100644 --- a/docs/data/deleting.rst +++ b/docs/data/deleting.rst @@ -90,6 +90,9 @@ Permanently remove Mesh data from collection. 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to delete meshes or mesh. + 404 : Not Found * Mesh data was not found. diff --git a/docs/data/projecting.rst b/docs/data/projecting.rst index af3e104..965b6cc 100644 --- a/docs/data/projecting.rst +++ b/docs/data/projecting.rst @@ -38,7 +38,8 @@ API Reference var client = MeshyClient.Initialize(accountName, publicKey); var connection = await client.LoginAnonymouslyAsync(username); - var stateAttractions = await connection.Projections.Get(projectionName, + var stateAttractions = await connection.Projections.Get(projectionName, + filter, orderBy, page, pageSize); @@ -53,6 +54,8 @@ API Reference Unique identifier for user or device. projectionName : :type:`string`, :required:`required` Identifies name of mesh collection. e.g. person. + filter : :type:`string` + Criteria provided in a MongoDB format to limit results. orderBy : :type:`object` Defines which fields need to be ordered and direction. Review more ways to use `ordering <#ordering-data>`_. page : :type:`integer`, default: 1 @@ -72,6 +75,7 @@ API Reference var popularStates = await meshyConnection.projections.get(projectionName, { + filter: filter, orderBy: orderBy, page: page, pageSize: pageSize @@ -87,6 +91,8 @@ API Reference Unique identifier for user or device. projectionName : :type:`string`, :required:`required` Identifies name of mesh collection. e.g. person. + filter : :type:`string` + Criteria provided in a MongoDB format to limit results. orderBy : :type:`string` Defines which fields need to be ordered and direction in a MongoDB format. Review more ways to use `ordering <#ordering-data>`_. page : :type:`integer`, default: 1 @@ -111,6 +117,8 @@ API Reference Identifies name of mesh collection. e.g. person. projectionName : :type:`string`, :required:`required` Identifies name of mesh collection. e.g. person. + filter : :type:`string` + Criteria provided in a MongoDB format to limit results. orderBy : :type:`string` Defines which fields need to be ordered and direction in a MongoDB format. Review more ways to use `ordering <#ordering-data>`_. page : :type:`integer`, default: 1 @@ -143,7 +151,10 @@ Example Result 401 : Unauthorized * User is not authorized to make call. - + +403 : Forbidden + * User has insufficent permission to read projections. + 404 : Not Found * Projection was not found. diff --git a/docs/data/retrieving.rst b/docs/data/retrieving.rst index 66656b5..610d96b 100644 --- a/docs/data/retrieving.rst +++ b/docs/data/retrieving.rst @@ -108,6 +108,9 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to read meshes or mesh. + 404 : Not Found * Mesh data was not found. diff --git a/docs/data/searching.rst b/docs/data/searching.rst index 735d67d..bb0da27 100644 --- a/docs/data/searching.rst +++ b/docs/data/searching.rst @@ -136,6 +136,9 @@ Example Result 401 : Unauthorized * User is not authorized to make call. - + +403 : Forbidden + * User has insufficent permission to read meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. \ No newline at end of file diff --git a/docs/data/updating.rst b/docs/data/updating.rst index 669588e..ceff2fc 100644 --- a/docs/data/updating.rst +++ b/docs/data/updating.rst @@ -116,5 +116,8 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to update meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. \ No newline at end of file diff --git a/docs/intro/getting_started_csharp.rst b/docs/intro/getting_started_csharp.rst index f9ced9d..b575c99 100644 --- a/docs/intro/getting_started_csharp.rst +++ b/docs/intro/getting_started_csharp.rst @@ -321,6 +321,9 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to create meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. @@ -372,6 +375,9 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to update meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. @@ -428,6 +434,9 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to read meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. @@ -473,6 +482,9 @@ The example below shows deleting the data from the API by providing the object. 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to delete meshes or mesh. + 404 : Not Found * Mesh data was not found. diff --git a/docs/intro/getting_started_nodejs.rst b/docs/intro/getting_started_nodejs.rst index 1a3731b..6cdf694 100644 --- a/docs/intro/getting_started_nodejs.rst +++ b/docs/intro/getting_started_nodejs.rst @@ -300,6 +300,9 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to create meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. @@ -353,6 +356,9 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to update meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. @@ -410,7 +416,10 @@ Example Result 401 : Unauthorized * User is not authorized to make call. - + +403 : Forbidden + * User has insufficent permission to read meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. @@ -456,6 +465,9 @@ The example below shows deleting the data from the API by providing the object. 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to delete meshes or mesh. + 404 : Not Found * Mesh data was not found. diff --git a/docs/intro/getting_started_rest.rst b/docs/intro/getting_started_rest.rst index bda4fdd..5bcf124 100644 --- a/docs/intro/getting_started_rest.rst +++ b/docs/intro/getting_started_rest.rst @@ -327,6 +327,9 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to create meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. @@ -388,6 +391,9 @@ Example Result 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to update meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. @@ -455,7 +461,10 @@ Example Result 401 : Unauthorized * User is not authorized to make call. - + +403 : Forbidden + * User has insufficent permission to read meshes or mesh. + 429 : Too many request * You have either hit your API or Database limit. Please review your account. @@ -504,6 +513,9 @@ The example below shows deleting the data from the API by providing the object. 401 : Unauthorized * User is not authorized to make call. +403 : Forbidden + * User has insufficent permission to delete meshes or mesh. + 404 : Not Found * Mesh data was not found. From 355131ad58d4f6c7b505223ffd1065ea0f41cade Mon Sep 17 00:00:00 2001 From: Chris Pluta Date: Thu, 31 Oct 2019 23:38:21 -0500 Subject: [PATCH 4/4] Updating Documentation to reflect proper roles system --- docs/details/orderby.rst | 35 ---------------------------------- docs/roles/creating.rst | 0 docs/roles/deleting.rst | 0 docs/roles/retrieving.rst | 0 docs/roles/searching.rst | 0 docs/roles/updating.rst | 0 docs/users/retrieving_self.rst | 14 ++++++++++---- docs/users/updating_self.rst | 14 ++++++++++---- 8 files changed, 20 insertions(+), 43 deletions(-) delete mode 100644 docs/details/orderby.rst create mode 100644 docs/roles/creating.rst create mode 100644 docs/roles/deleting.rst create mode 100644 docs/roles/retrieving.rst create mode 100644 docs/roles/searching.rst create mode 100644 docs/roles/updating.rst diff --git a/docs/details/orderby.rst b/docs/details/orderby.rst deleted file mode 100644 index 7bba563..0000000 --- a/docs/details/orderby.rst +++ /dev/null @@ -1,35 +0,0 @@ --------- -Order By --------- - -Ordering is supported in a MongoDB format. This format is as an object with a -1 or 1 to identify descending or ascending format respectively. - -The following example shows how to sort an object by Name in descending order. - -.. code-block:: json - - { "Name": -1 } - -The C# implementation allows an alternative for constructing the object. - -The following example is the equivalent in C#. - -.. code-block:: c# - - OrderByDefinition.OrderByDescending("Name"); - - // Or - - OrderByDefinition.OrderByDescending(x => x.Name); - -To add additional filters it can be extended as follows. - -This example will order by Name descending then Age ascending. - -.. code-block:: c# - - OrderByDefinition.OrderByDescending("Name").ThenBy("Age"); - - // Or - - OrderByDefinition.OrderByDescending(x => x.Name).ThenBy(x=> x.Age); diff --git a/docs/roles/creating.rst b/docs/roles/creating.rst new file mode 100644 index 0000000..e69de29 diff --git a/docs/roles/deleting.rst b/docs/roles/deleting.rst new file mode 100644 index 0000000..e69de29 diff --git a/docs/roles/retrieving.rst b/docs/roles/retrieving.rst new file mode 100644 index 0000000..e69de29 diff --git a/docs/roles/searching.rst b/docs/roles/searching.rst new file mode 100644 index 0000000..e69de29 diff --git a/docs/roles/updating.rst b/docs/roles/updating.rst new file mode 100644 index 0000000..e69de29 diff --git a/docs/users/retrieving_self.rst b/docs/users/retrieving_self.rst index 75376b7..3eab731 100644 --- a/docs/users/retrieving_self.rst +++ b/docs/users/retrieving_self.rst @@ -83,10 +83,16 @@ Example Result "verified": true, "isActive": true, "phoneNumber": "5555555555", - "roles": [ - "admin", - "test" - ], + "roles" : [ + { + "name":"admin", + "addedDate":"2019-01-01T00:00:00.0000000+00:00" + }, + { + "name":"test", + "addedDate":"2019-01-01T00:00:00.0000000+00:00" + } + ], "securityQuestions": [ { "question": "What would you say to this question?", diff --git a/docs/users/updating_self.rst b/docs/users/updating_self.rst index f375d7b..7da9fc4 100644 --- a/docs/users/updating_self.rst +++ b/docs/users/updating_self.rst @@ -128,10 +128,16 @@ Example Result "isActive": true, "phoneNumber": "+15555555555", "emailAddress": "test@test.com", - "roles": [ - "admin", - "test" - ], + "roles" : [ + { + "name":"admin", + "addedDate":"2019-01-01T00:00:00.0000000+00:00" + }, + { + "name":"test", + "addedDate":"2019-01-01T00:00:00.0000000+00:00" + } + ], "securityQuestions": [ { "question": "What would you say to this question?",