The Playground API is an interactive interface that makes it easy to write queries.
It has auto-complete text input, as well as documentation on all fields and objects.
In this section, you'll learn how to complete authorization using the Playground API to make queries,
as well as how to explore the different API methods yourself. You can read more about authorization here
Authorization using API Playground
In order to start working with the Playground API, you need to register at the test stand.
- To do this, go to the test stand site and register.
Be sure to specify your email, as it will be used for authorization below.

- After that, create a new organization in the system, specifying the real TIN and the name of your organization:

- Now go to API Playground and run the following query:
{ authenticatedUser { id name } }
The response to this request shows which user the requests come from and whether or not you are authorized in the console.
You should get a response of
{ "data": { "authenticatedUser": null } }
which means,
that you are not authorized in the console.- Complete the authentication request using the email and password you specified during registration:
mutation { authenticateUserWithPassword(email: "yourmail@example.com", password: "yourpassword") { token item { id name } } }
In return, you will receive the token to access the Condo API and information about your user.

- Set the obtained token to the
HTTP HEADERS
tab in the format{"Authorization": "Bearer <token>"}
and resend the request from step 3. At this point, you should get the current user's credentials, which means that you have successfully set up an authorization token and can make requests to the API using this token.

Viewing available fields using the Playground API DOCS
We have just obtained basic information about the identifier and name of our user.
Let's see what other information we can get about ourselves.
To do that, let's open the
DOCS
tab in the Playground API and find there the authenticatedUser
query we're using.
Here we can see that the result of this query is an object of type
User
, which has many more fields
than the name and the identifier.
Let's try to get additionally the type of the user and his avatar.
To do that, let's add the corresponding fields to the query.
Note that the fields that are mandatory for a model or type are denoted by the symbol !
.
The documentation says that the field with the user's avatar contains its own set of subfields,
so we have to specify for it exactly what kind of data we want.
As an example, let's just take the file link (
publicUrl
) and re-run the query.
Now in addition to the name of the user we also know that his type is
staff
.
In addition to employees, there are users with the type resident
, as well as service accounts (service
).Note that the
avatar
field in the response is set to null
because this user has no profile picture.Returning a parent entity
avatar: null
instead of the requested set of fields avatar: { publicUrl: null }
is a common Condo API behavior model in situations where the entity does not exist, has been deleted,
or the user cannot access it
(In that case, the null
value in the data
section is accompanied by a corresponding error message in the errors
section).In the
DOCS
tab you can also see all the arguments for a particular query. To do this, select the method of interest in the Playground API list.
By now you should have enough knowledge to explore the Condo API on your own.
But we still recommend to read the examples of queries to the main Condo API subject models :)