Chilkat Online Tools

SQL Server / Atlassian Confluence Cloud / Get space properties

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    DECLARE @queryParams int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @queryParams OUT

    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'expand', '<string>'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'expand', '<string>'
    EXEC sp_OAMethod @queryParams, 'UpdateInt', @success OUT, 'start', 0
    EXEC sp_OAMethod @queryParams, 'UpdateInt', @success OUT, 'limit', 10

    -- Adds the "Authorization: Bearer <access_token>" header.
    EXEC sp_OASetProperty @http, 'AuthToken', '<access_token>'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://your-domain.atlassian.net/wiki/rest/api/space/:spaceKey/property', @queryParams
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @queryParams
        RETURN
      END

    DECLARE @sbResponseBody int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @queryParams
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @resp

    -- Sample JSON response:
    -- (Sample code for parsing the JSON response is shown below)

    -- {
    --   "results": [
    --     {
    --       "id": 19427264,
    --       "key": "id non",
    --       "value": {},
    --       "_expandable": {
    --         "version": "aute culpa",
    --         "space": "sit fugiat"
    --       },
    --       "version": {
    --         "when": "1988-02-08T03:27:37.011Z",
    --         "message": "velit aliqua labore incididunt",
    --         "number": -41582376,
    --         "minorEdit": false
    --       },
    --       "space": {
    --         "id": 20731255,
    --         "key": "ut",
    --         "name": "do aliqua laboris eiusmod",
    --         "type": "exercitation id",
    --         "status": "consectetur ullamco",
    --         "_expandable": {
    --           "settings": "sint",
    --           "metadata": "quis non",
    --           "operations": "dolor in cillum",
    --           "lookAndFeel": "tempor qui",
    --           "permissions": "Duis veniam mollit nisi",
    --           "icon": "culpa est",
    --           "description": "ex sunt labore id",
    --           "theme": "id minim",
    --           "history": "inci",
    --           "homepage": "occaecat in dolor quis"
    --         },
    --         "_links": {},
    --         "icon": {
    --           "path": "nisi non esse culpa",
    --           "width": 99533791,
    --           "height": -28134599,
    --           "isDefault": true
    --         },
    --         "description": {
    --           "plain": {
    --             "value": "dolor proident ut deserunt",
    --             "representation": "plain",
    --             "embeddedContent": [
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             ]
    --           },
    --           "view": {
    --             "value": "consequat",
    --             "representation": "plain",
    --             "embeddedContent": [
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             ]
    --           }
    --         },
    --         "homepage": {
    --           "value": "<Circular reference to #/components/schemas/Content detected>"
    --         },
    --         "metadata": {
    --           "labels": {
    --             "results": [
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             ],
    --             "start": -59083965,
    --             "limit": 75849140,
    --             "size": 92184684,
    --             "_links": {}
    --           }
    --         },
    --         "operations": [
    --           {
    --             "operation": "restore",
    --             "targetType": "attachment"
    --           },
    --           {
    --             "operation": "export",
    --             "targetType": "application"
    --           }
    --         ],
    --         "permissions": [
    --           {
    --             "subjects": {
    --               "_expandable": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               "user": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               "group": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             },
    --             "operation": {
    --               "operation": "create",
    --               "targetType": "space"
    --             },
    --             "anonymousAccess": false,
    --             "unlicensedAccess": false
    --           },
    --           {
    --             "subjects": {
    --               "_expandable": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               "user": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               "group": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             },
    --             "operation": {
    --               "operation": "delete",
    --               "targetType": "space"
    --             },
    --             "anonymousAccess": false,
    --             "unlicensedAccess": false
    --           }
    --         ],
    --         "settings": {
    --           "routeOverrideEnabled": false,
    --           "_links": {}
    --         },
    --         "theme": {},
    --         "lookAndFeel": {
    --           "headings": {
    --             "color": "<string>"
    --           },
    --           "links": {
    --             "color": "<string>"
    --           },
    --           "menus": {
    --             "hoverOrFocus": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "color": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             }
    --           },
    --           "header": {
    --             "backgroundColor": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "button": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "primaryNavigation": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "secondaryNavigation": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "search": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             }
    --           },
    --           "content": {
    --             "screen": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "container": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "header": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "body": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             }
    --           },
    --           "bordersAndDividers": {
    --             "color": "<string>"
    --           }
    --         },
    --         "history": {
    --           "createdDate": "2003-06-18T11:28:40.383Z"
    --         }
    --       }
    --     },
    --     {
    --       "id": 50590702,
    --       "key": "minim adipisicing mollit ut",
    --       "value": {},
    --       "_expandable": {
    --         "version": "sed ad el",
    --         "space": "pariatur deserunt in labore aliquip"
    --       },
    --       "version": {
    --         "when": "1970-01-13T15:48:59.108Z",
    --         "message": "in mollit pariatur",
    --         "number": -34696343,
    --         "minorEdit": false
    --       },
    --       "space": {
    --         "id": 2257956,
    --         "key": "deserunt ",
    --         "name": "pariatur",
    --         "type": "mollit dolore",
    --         "status": "voluptate o",
    --         "_expandable": {
    --           "settings": "dolor officia",
    --           "metadata": "nostrud proident qui",
    --           "operations": "dolore",
    --           "lookAndFeel": "ex",
    --           "permissions": "et ea ad do",
    --           "icon": "ea anim laborum",
    --           "description": "nostrud n",
    --           "theme": "est irure proident",
    --           "history": "aute magna",
    --           "homepage": "voluptate labore"
    --         },
    --         "_links": {},
    --         "icon": {
    --           "path": "ex consectetur",
    --           "width": -6687916,
    --           "height": 6284709,
    --           "isDefault": false
    --         },
    --         "description": {
    --           "plain": {
    --             "value": "magna",
    --             "representation": "plain",
    --             "embeddedContent": [
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             ]
    --           },
    --           "view": {
    --             "value": "mollit",
    --             "representation": "view",
    --             "embeddedContent": [
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             ]
    --           }
    --         },
    --         "homepage": {
    --           "value": "<Circular reference to #/components/schemas/Content detected>"
    --         },
    --         "metadata": {
    --           "labels": {
    --             "results": [
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             ],
    --             "start": 31563568,
    --             "limit": 7437848,
    --             "size": -50600293,
    --             "_links": {}
    --           }
    --         },
    --         "operations": [
    --           {
    --             "operation": "export",
    --             "targetType": "application"
    --           },
    --           {
    --             "operation": "read",
    --             "targetType": "blogpost"
    --           }
    --         ],
    --         "permissions": [
    --           {
    --             "subjects": {
    --               "_expandable": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               "user": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               "group": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             },
    --             "operation": {
    --               "operation": "delete",
    --               "targetType": "attachment"
    --             },
    --             "anonymousAccess": false,
    --             "unlicensedAccess": false
    --           },
    --           {
    --             "subjects": {
    --               "_expandable": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               "user": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               },
    --               "group": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             },
    --             "operation": {
    --               "operation": "purge",
    --               "targetType": "space"
    --             },
    --             "anonymousAccess": false,
    --             "unlicensedAccess": false
    --           }
    --         ],
    --         "settings": {
    --           "routeOverrideEnabled": true,
    --           "_links": {}
    --         },
    --         "theme": {},
    --         "lookAndFeel": {
    --           "headings": {
    --             "color": "<string>"
    --           },
    --           "links": {
    --             "color": "<string>"
    --           },
    --           "menus": {
    --             "hoverOrFocus": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "color": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             }
    --           },
    --           "header": {
    --             "backgroundColor": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "button": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "primaryNavigation": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "secondaryNavigation": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "search": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             }
    --           },
    --           "content": {
    --             "screen": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "container": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "header": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             },
    --             "body": {
    --               "value": "<Error: Too many levels of nesting to fake this schema>"
    --             }
    --           },
    --           "bordersAndDividers": {
    --             "color": "<string>"
    --           }
    --         },
    --         "history": {
    --           "createdDate": "1946-10-24T07:33:44.994Z"
    --         }
    --       }
    --     }
    --   ],
    --   "start": -871862,
    --   "limit": -29998484,
    --   "size": 16090591,
    --   "_links": {}
    -- }

    -- Sample code for parsing the JSON response...
    -- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    DECLARE @id int

    DECLARE @key nvarchar(4000)

    DECLARE @Version nvarchar(4000)

    DECLARE @Space nvarchar(4000)

    DECLARE @When nvarchar(4000)

    DECLARE @Message nvarchar(4000)

    DECLARE @v_Number int

    DECLARE @MinorEdit int

    DECLARE @Id int

    DECLARE @Key nvarchar(4000)

    DECLARE @Name nvarchar(4000)

    DECLARE @v_Type nvarchar(4000)

    DECLARE @Status nvarchar(4000)

    DECLARE @Settings nvarchar(4000)

    DECLARE @Metadata nvarchar(4000)

    DECLARE @Operations nvarchar(4000)

    DECLARE @LookAndFeel nvarchar(4000)

    DECLARE @Permissions nvarchar(4000)

    DECLARE @Icon nvarchar(4000)

    DECLARE @Description nvarchar(4000)

    DECLARE @Theme nvarchar(4000)

    DECLARE @History nvarchar(4000)

    DECLARE @Homepage nvarchar(4000)

    DECLARE @Path nvarchar(4000)

    DECLARE @Width int

    DECLARE @Height int

    DECLARE @IsDefault int

    DECLARE @Value nvarchar(4000)

    DECLARE @Representation nvarchar(4000)

    DECLARE @ViewValue nvarchar(4000)

    DECLARE @ViewRepresentation nvarchar(4000)

    DECLARE @HomepageValue nvarchar(4000)

    DECLARE @Start int

    DECLARE @Limit int

    DECLARE @Size int

    DECLARE @RouteOverrideEnabled int

    DECLARE @Color nvarchar(4000)

    DECLARE @LinksColor nvarchar(4000)

    DECLARE @HoverOrFocusValue nvarchar(4000)

    DECLARE @ColorValue nvarchar(4000)

    DECLARE @BackgroundColorValue nvarchar(4000)

    DECLARE @ButtonValue nvarchar(4000)

    DECLARE @PrimaryNavigationValue nvarchar(4000)

    DECLARE @SecondaryNavigationValue nvarchar(4000)

    DECLARE @SearchValue nvarchar(4000)

    DECLARE @ScreenValue nvarchar(4000)

    DECLARE @ContainerValue nvarchar(4000)

    DECLARE @HeaderValue nvarchar(4000)

    DECLARE @BodyValue nvarchar(4000)

    DECLARE @BordersAndDividersColor nvarchar(4000)

    DECLARE @CreatedDate nvarchar(4000)

    DECLARE @j int

    DECLARE @count_j int

    DECLARE @value nvarchar(4000)

    DECLARE @operation nvarchar(4000)

    DECLARE @targetType nvarchar(4000)

    DECLARE @v_expandableValue nvarchar(4000)

    DECLARE @UserValue nvarchar(4000)

    DECLARE @GroupValue nvarchar(4000)

    DECLARE @Operation nvarchar(4000)

    DECLARE @TargetType nvarchar(4000)

    DECLARE @anonymousAccess int

    DECLARE @unlicensedAccess int

    DECLARE @start int
    EXEC sp_OAMethod @jResp, 'IntOf', @start OUT, 'start'
    DECLARE @limit int
    EXEC sp_OAMethod @jResp, 'IntOf', @limit OUT, 'limit'
    DECLARE @size int
    EXEC sp_OAMethod @jResp, 'IntOf', @size OUT, 'size'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'results'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'IntOf', @id OUT, 'results[i].id'
        EXEC sp_OAMethod @jResp, 'StringOf', @key OUT, 'results[i].key'
        EXEC sp_OAMethod @jResp, 'StringOf', @Version OUT, 'results[i]._expandable.version'
        EXEC sp_OAMethod @jResp, 'StringOf', @Space OUT, 'results[i]._expandable.space'
        EXEC sp_OAMethod @jResp, 'StringOf', @When OUT, 'results[i].version.when'
        EXEC sp_OAMethod @jResp, 'StringOf', @Message OUT, 'results[i].version.message'
        EXEC sp_OAMethod @jResp, 'IntOf', @v_Number OUT, 'results[i].version.number'
        EXEC sp_OAMethod @jResp, 'BoolOf', @MinorEdit OUT, 'results[i].version.minorEdit'
        EXEC sp_OAMethod @jResp, 'IntOf', @Id OUT, 'results[i].space.id'
        EXEC sp_OAMethod @jResp, 'StringOf', @Key OUT, 'results[i].space.key'
        EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'results[i].space.name'
        EXEC sp_OAMethod @jResp, 'StringOf', @v_Type OUT, 'results[i].space.type'
        EXEC sp_OAMethod @jResp, 'StringOf', @Status OUT, 'results[i].space.status'
        EXEC sp_OAMethod @jResp, 'StringOf', @Settings OUT, 'results[i].space._expandable.settings'
        EXEC sp_OAMethod @jResp, 'StringOf', @Metadata OUT, 'results[i].space._expandable.metadata'
        EXEC sp_OAMethod @jResp, 'StringOf', @Operations OUT, 'results[i].space._expandable.operations'
        EXEC sp_OAMethod @jResp, 'StringOf', @LookAndFeel OUT, 'results[i].space._expandable.lookAndFeel'
        EXEC sp_OAMethod @jResp, 'StringOf', @Permissions OUT, 'results[i].space._expandable.permissions'
        EXEC sp_OAMethod @jResp, 'StringOf', @Icon OUT, 'results[i].space._expandable.icon'
        EXEC sp_OAMethod @jResp, 'StringOf', @Description OUT, 'results[i].space._expandable.description'
        EXEC sp_OAMethod @jResp, 'StringOf', @Theme OUT, 'results[i].space._expandable.theme'
        EXEC sp_OAMethod @jResp, 'StringOf', @History OUT, 'results[i].space._expandable.history'
        EXEC sp_OAMethod @jResp, 'StringOf', @Homepage OUT, 'results[i].space._expandable.homepage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Path OUT, 'results[i].space.icon.path'
        EXEC sp_OAMethod @jResp, 'IntOf', @Width OUT, 'results[i].space.icon.width'
        EXEC sp_OAMethod @jResp, 'IntOf', @Height OUT, 'results[i].space.icon.height'
        EXEC sp_OAMethod @jResp, 'BoolOf', @IsDefault OUT, 'results[i].space.icon.isDefault'
        EXEC sp_OAMethod @jResp, 'StringOf', @Value OUT, 'results[i].space.description.plain.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @Representation OUT, 'results[i].space.description.plain.representation'
        EXEC sp_OAMethod @jResp, 'StringOf', @ViewValue OUT, 'results[i].space.description.view.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @ViewRepresentation OUT, 'results[i].space.description.view.representation'
        EXEC sp_OAMethod @jResp, 'StringOf', @HomepageValue OUT, 'results[i].space.homepage.value'
        EXEC sp_OAMethod @jResp, 'IntOf', @Start OUT, 'results[i].space.metadata.labels.start'
        EXEC sp_OAMethod @jResp, 'IntOf', @Limit OUT, 'results[i].space.metadata.labels.limit'
        EXEC sp_OAMethod @jResp, 'IntOf', @Size OUT, 'results[i].space.metadata.labels.size'
        EXEC sp_OAMethod @jResp, 'BoolOf', @RouteOverrideEnabled OUT, 'results[i].space.settings.routeOverrideEnabled'
        EXEC sp_OAMethod @jResp, 'StringOf', @Color OUT, 'results[i].space.lookAndFeel.headings.color'
        EXEC sp_OAMethod @jResp, 'StringOf', @LinksColor OUT, 'results[i].space.lookAndFeel.links.color'
        EXEC sp_OAMethod @jResp, 'StringOf', @HoverOrFocusValue OUT, 'results[i].space.lookAndFeel.menus.hoverOrFocus.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @ColorValue OUT, 'results[i].space.lookAndFeel.menus.color.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @BackgroundColorValue OUT, 'results[i].space.lookAndFeel.header.backgroundColor.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @ButtonValue OUT, 'results[i].space.lookAndFeel.header.button.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @PrimaryNavigationValue OUT, 'results[i].space.lookAndFeel.header.primaryNavigation.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @SecondaryNavigationValue OUT, 'results[i].space.lookAndFeel.header.secondaryNavigation.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @SearchValue OUT, 'results[i].space.lookAndFeel.header.search.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @ScreenValue OUT, 'results[i].space.lookAndFeel.content.screen.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @ContainerValue OUT, 'results[i].space.lookAndFeel.content.container.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @HeaderValue OUT, 'results[i].space.lookAndFeel.content.header.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @BodyValue OUT, 'results[i].space.lookAndFeel.content.body.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @BordersAndDividersColor OUT, 'results[i].space.lookAndFeel.bordersAndDividers.color'
        EXEC sp_OAMethod @jResp, 'StringOf', @CreatedDate OUT, 'results[i].space.history.createdDate'
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'results[i].space.description.plain.embeddedContent'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'results[i].space.description.plain.embeddedContent[j].value'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'results[i].space.description.view.embeddedContent'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'results[i].space.description.view.embeddedContent[j].value'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'results[i].space.metadata.labels.results'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'results[i].space.metadata.labels.results[j].value'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'results[i].space.operations'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @operation OUT, 'results[i].space.operations[j].operation'
            EXEC sp_OAMethod @jResp, 'StringOf', @targetType OUT, 'results[i].space.operations[j].targetType'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'results[i].space.permissions'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @v_expandableValue OUT, 'results[i].space.permissions[j].subjects._expandable.value'
            EXEC sp_OAMethod @jResp, 'StringOf', @UserValue OUT, 'results[i].space.permissions[j].subjects.user.value'
            EXEC sp_OAMethod @jResp, 'StringOf', @GroupValue OUT, 'results[i].space.permissions[j].subjects.group.value'
            EXEC sp_OAMethod @jResp, 'StringOf', @Operation OUT, 'results[i].space.permissions[j].operation.operation'
            EXEC sp_OAMethod @jResp, 'StringOf', @TargetType OUT, 'results[i].space.permissions[j].operation.targetType'
            EXEC sp_OAMethod @jResp, 'BoolOf', @anonymousAccess OUT, 'results[i].space.permissions[j].anonymousAccess'
            EXEC sp_OAMethod @jResp, 'BoolOf', @unlicensedAccess OUT, 'results[i].space.permissions[j].unlicensedAccess'
            SELECT @j = @j + 1
          END
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @queryParams
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl -G -d "expand=%3Cstring%3E"
	-d "expand=%3Cstring%3E"
	-d "start=0"
	-d "limit=10"
	-H "Authorization: Bearer <access_token>"
https://your-domain.atlassian.net/wiki/rest/api/space/:spaceKey/property

Postman Collection Item JSON

{
  "name": "Get space properties",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/api/space/:spaceKey/property?expand=<string>&expand=<string>&start=0&limit=10",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "space",
        ":spaceKey",
        "property"
      ],
      "query": [
        {
          "key": "expand",
          "value": "<string>",
          "description": "A multi-value parameter indicating which properties of the space\nproperty to expand. By default, the `version` object is expanded.\n\n- `version` returns information about the version of the content.\n- `space` returns the space that the properties are in."
        },
        {
          "key": "expand",
          "value": "<string>",
          "description": "A multi-value parameter indicating which properties of the space\nproperty to expand. By default, the `version` object is expanded.\n\n- `version` returns information about the version of the content.\n- `space` returns the space that the properties are in."
        },
        {
          "key": "start",
          "value": "0",
          "description": "The starting index of the returned objects."
        },
        {
          "key": "limit",
          "value": "10",
          "description": "The maximum number of properties to return per page. Note, this may be\nrestricted by fixed system limits."
        }
      ],
      "variable": [
        {
          "key": "spaceKey",
          "value": "<string>",
          "type": "string",
          "description": "(Required) The key of the space to be queried for its properties."
        }
      ]
    },
    "description": "Returns all properties for the given space. Space properties are a key-value storage associated with a space.\n\n**[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space."
  },
  "response": [
    {
      "name": "Returned if the requested space properties are returned.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": {
              "content": "Added as a part of security scheme: oauth2",
              "type": "text/plain"
            },
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/space/:spaceKey/property?expand=<string>&expand=<string>&start=0&limit=10",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "space",
            ":spaceKey",
            "property"
          ],
          "query": [
            {
              "key": "expand",
              "value": "<string>"
            },
            {
              "key": "expand",
              "value": "<string>"
            },
            {
              "key": "start",
              "value": "0"
            },
            {
              "key": "limit",
              "value": "10"
            }
          ],
          "variable": [
            {
              "key": "spaceKey"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"results\": [\n  {\n   \"id\": 19427264,\n   \"key\": \"id non\",\n   \"value\": {},\n   \"_expandable\": {\n    \"version\": \"aute culpa\",\n    \"space\": \"sit fugiat\"\n   },\n   \"version\": {\n    \"when\": \"1988-02-08T03:27:37.011Z\",\n    \"message\": \"velit aliqua labore incididunt\",\n    \"number\": -41582376,\n    \"minorEdit\": false\n   },\n   \"space\": {\n    \"id\": 20731255,\n    \"key\": \"ut\",\n    \"name\": \"do aliqua laboris eiusmod\",\n    \"type\": \"exercitation id\",\n    \"status\": \"consectetur ullamco\",\n    \"_expandable\": {\n     \"settings\": \"sint\",\n     \"metadata\": \"quis non\",\n     \"operations\": \"dolor in cillum\",\n     \"lookAndFeel\": \"tempor qui\",\n     \"permissions\": \"Duis veniam mollit nisi\",\n     \"icon\": \"culpa est\",\n     \"description\": \"ex sunt labore id\",\n     \"theme\": \"id minim\",\n     \"history\": \"inci\",\n     \"homepage\": \"occaecat in dolor quis\"\n    },\n    \"_links\": {},\n    \"icon\": {\n     \"path\": \"nisi non esse culpa\",\n     \"width\": 99533791,\n     \"height\": -28134599,\n     \"isDefault\": true\n    },\n    \"description\": {\n     \"plain\": {\n      \"value\": \"dolor proident ut deserunt\",\n      \"representation\": \"plain\",\n      \"embeddedContent\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ]\n     },\n     \"view\": {\n      \"value\": \"consequat\",\n      \"representation\": \"plain\",\n      \"embeddedContent\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ]\n     }\n    },\n    \"homepage\": {\n     \"value\": \"<Circular reference to #/components/schemas/Content detected>\"\n    },\n    \"metadata\": {\n     \"labels\": {\n      \"results\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ],\n      \"start\": -59083965,\n      \"limit\": 75849140,\n      \"size\": 92184684,\n      \"_links\": {}\n     }\n    },\n    \"operations\": [\n     {\n      \"operation\": \"restore\",\n      \"targetType\": \"attachment\"\n     },\n     {\n      \"operation\": \"export\",\n      \"targetType\": \"application\"\n     }\n    ],\n    \"permissions\": [\n     {\n      \"subjects\": {\n       \"_expandable\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"user\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"group\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      },\n      \"operation\": {\n       \"operation\": \"create\",\n       \"targetType\": \"space\"\n      },\n      \"anonymousAccess\": false,\n      \"unlicensedAccess\": false\n     },\n     {\n      \"subjects\": {\n       \"_expandable\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"user\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"group\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      },\n      \"operation\": {\n       \"operation\": \"delete\",\n       \"targetType\": \"space\"\n      },\n      \"anonymousAccess\": false,\n      \"unlicensedAccess\": false\n     }\n    ],\n    \"settings\": {\n     \"routeOverrideEnabled\": false,\n     \"_links\": {}\n    },\n    \"theme\": {},\n    \"lookAndFeel\": {\n     \"headings\": {\n      \"color\": \"<string>\"\n     },\n     \"links\": {\n      \"color\": \"<string>\"\n     },\n     \"menus\": {\n      \"hoverOrFocus\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"color\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"header\": {\n      \"backgroundColor\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"button\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"primaryNavigation\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"secondaryNavigation\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"search\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"content\": {\n      \"screen\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"container\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"header\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"body\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"bordersAndDividers\": {\n      \"color\": \"<string>\"\n     }\n    },\n    \"history\": {\n     \"createdDate\": \"2003-06-18T11:28:40.383Z\"\n    }\n   }\n  },\n  {\n   \"id\": 50590702,\n   \"key\": \"minim adipisicing mollit ut\",\n   \"value\": {},\n   \"_expandable\": {\n    \"version\": \"sed ad el\",\n    \"space\": \"pariatur deserunt in labore aliquip\"\n   },\n   \"version\": {\n    \"when\": \"1970-01-13T15:48:59.108Z\",\n    \"message\": \"in mollit pariatur\",\n    \"number\": -34696343,\n    \"minorEdit\": false\n   },\n   \"space\": {\n    \"id\": 2257956,\n    \"key\": \"deserunt \",\n    \"name\": \"pariatur\",\n    \"type\": \"mollit dolore\",\n    \"status\": \"voluptate o\",\n    \"_expandable\": {\n     \"settings\": \"dolor officia\",\n     \"metadata\": \"nostrud proident qui\",\n     \"operations\": \"dolore\",\n     \"lookAndFeel\": \"ex\",\n     \"permissions\": \"et ea ad do\",\n     \"icon\": \"ea anim laborum\",\n     \"description\": \"nostrud n\",\n     \"theme\": \"est irure proident\",\n     \"history\": \"aute magna\",\n     \"homepage\": \"voluptate labore\"\n    },\n    \"_links\": {},\n    \"icon\": {\n     \"path\": \"ex consectetur\",\n     \"width\": -6687916,\n     \"height\": 6284709,\n     \"isDefault\": false\n    },\n    \"description\": {\n     \"plain\": {\n      \"value\": \"magna\",\n      \"representation\": \"plain\",\n      \"embeddedContent\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ]\n     },\n     \"view\": {\n      \"value\": \"mollit\",\n      \"representation\": \"view\",\n      \"embeddedContent\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ]\n     }\n    },\n    \"homepage\": {\n     \"value\": \"<Circular reference to #/components/schemas/Content detected>\"\n    },\n    \"metadata\": {\n     \"labels\": {\n      \"results\": [\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      ],\n      \"start\": 31563568,\n      \"limit\": 7437848,\n      \"size\": -50600293,\n      \"_links\": {}\n     }\n    },\n    \"operations\": [\n     {\n      \"operation\": \"export\",\n      \"targetType\": \"application\"\n     },\n     {\n      \"operation\": \"read\",\n      \"targetType\": \"blogpost\"\n     }\n    ],\n    \"permissions\": [\n     {\n      \"subjects\": {\n       \"_expandable\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"user\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"group\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      },\n      \"operation\": {\n       \"operation\": \"delete\",\n       \"targetType\": \"attachment\"\n      },\n      \"anonymousAccess\": false,\n      \"unlicensedAccess\": false\n     },\n     {\n      \"subjects\": {\n       \"_expandable\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"user\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       },\n       \"group\": {\n        \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n       }\n      },\n      \"operation\": {\n       \"operation\": \"purge\",\n       \"targetType\": \"space\"\n      },\n      \"anonymousAccess\": false,\n      \"unlicensedAccess\": false\n     }\n    ],\n    \"settings\": {\n     \"routeOverrideEnabled\": true,\n     \"_links\": {}\n    },\n    \"theme\": {},\n    \"lookAndFeel\": {\n     \"headings\": {\n      \"color\": \"<string>\"\n     },\n     \"links\": {\n      \"color\": \"<string>\"\n     },\n     \"menus\": {\n      \"hoverOrFocus\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"color\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"header\": {\n      \"backgroundColor\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"button\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"primaryNavigation\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"secondaryNavigation\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"search\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"content\": {\n      \"screen\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"container\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"header\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      },\n      \"body\": {\n       \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n      }\n     },\n     \"bordersAndDividers\": {\n      \"color\": \"<string>\"\n     }\n    },\n    \"history\": {\n     \"createdDate\": \"1946-10-24T07:33:44.994Z\"\n    }\n   }\n  }\n ],\n \"start\": -871862,\n \"limit\": -29998484,\n \"size\": 16090591,\n \"_links\": {}\n}"
    },
    {
      "name": "Returned if any of the following is true:\n\n- There is no space with the given key.\n- The calling user does not have permission to view the space.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": {
              "content": "Added as a part of security scheme: oauth2",
              "type": "text/plain"
            },
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/space/:spaceKey/property?expand=<string>&expand=<string>&start=0&limit=10",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "space",
            ":spaceKey",
            "property"
          ],
          "query": [
            {
              "key": "expand",
              "value": "<string>"
            },
            {
              "key": "expand",
              "value": "<string>"
            },
            {
              "key": "start",
              "value": "0"
            },
            {
              "key": "limit",
              "value": "10"
            }
          ],
          "variable": [
            {
              "key": "spaceKey"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}