# Get current Workspace

- Operation ID: `getCurrentBusinessProfileUsingGET`
- HTTP method: `GET`
- Path: `/uauth/business-profile/current`
- [Human-readable API reference](https://hub.synerise.com/api-reference/authorization#tag/Authorization/operation/getCurrentBusinessProfileUsingGET)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /uauth/business-profile/current:
    get:
      tags:
        - Authorization
      summary: Get current Workspace
      description: |
        Retrieve information about the currently selected workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      operationId: getCurrentBusinessProfileUsingGET
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  selected:
                    type: boolean
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        format: int32
                      name:
                        type: string
                      logo:
                        type: string
                      businessProfileGuid:
                        type: string
                      created:
                        type: string
                        format: date-time
                      subdomain:
                        type: string
                      ipRestriction:
                        type: string
                        enum:
                          - OFF
                          - PASS
                          - FAIL
                          - ENFORCED
                      mfaRestriction:
                        type: string
                        enum:
                          - OFF
                          - PASS
                          - FAIL
                          - ENFORCED
                      labels:
                        type: array
                        items:
                          type: string
                      emailAttributeName:
                        type: string
                      organizationGuid:
                        type: string
                      businessProfileGroup:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                          profileIdentifier:
                            type: string
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/authorization#tag/Authorization/operation/getCurrentBusinessProfileUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/uauth/business-profile/current \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/uauth/business-profile/current", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/uauth/business-profile/current");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/uauth/business-profile/current",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/business-profile/current');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/uauth/business-profile/current")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Authorization
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
