# Operations with Specific License

This resource lets you work with the license of your YouTrack service.
|  Resource  |     ```GENERIC /api/admin/globalSettings/license ```    |
| --- | --- |
|  Returned entity  |  [License](api-entity-License.html). For the description of the entity attributes, see [Supported Fields](#License-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Read a Specific License](#get-License-method).    * `POST`: [Update a Specific License](#update-License-method).    |

## License attributes

Represents the current license of the YouTrack service.

### Related Resources

Below you can find the list of resources that let you work with this entity.

* [License](resource-api-admin-globalSettings-license.html)

### Attributes

This table describes attributes of the `License` entity.

* To receive an attribute in the response from the server, specify it explicitly in the `fields` request parameter.

* To update an attribute, provide it in the body of a POST request.

|  Field  |  Type  |  Description  |
| --- | --- | --- |
|  id  |  String  |  The ID of the license. `Read-only`.  |
|  username  |  String  |  Username used for license. `Can be null`.  |
|  license  |  String  |  License key. `Can be null`.  |
|  error  |  String  |  License error. If there is no error, this property is empty. `Read-only`. `Can be null`.  |

## Read a Specific License

Read the license of your YouTrack service.

### Request syntax

```GENERIC
GET /api/admin/globalSettings/license?{fields}
```

|  null  |  The database ID of License  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of License attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/admin/globalSettings/license?fields=username,license,error
```

#### Sample response body

```JSON
{
  "username": "example",
  "license": "17269e7714ee93dec5002a17427b55f3126a37635d9a41349ffb02dfc0b1bd7b167dcb56232813da571653c087bb2e1ff9325e4775d494c2f99eab72100d1e90cf7532d8f4e721b27521d107fb3f62",
  "error": null,
  "$type": "License"
}
```

## Update a Specific License

Change the license of your YouTrack service.

### Required permissions

Requires permissions: Low-level Admin Write

### Request syntax

```GENERIC
POST /api/admin/globalSettings/license?{fields}
```

|  null  |  The database ID of License  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of License attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/admin/globalSettings/license?fields=username,license,error
```

#### Sample request body

```JSON
{
  "username": "sample",
  "license": "17269e7714ee93dec5002a17427b55f3126a37635d9a49325e4775d494c2f99eab72100d1e90cf7532d8f4e721b27521d107fb3f62"
}
```

#### Sample response body

```JSON
{
  "username": "sample",
  "license": "17269e7714ee93dec5002a17427b55f3126a37635d9a49325e4775d494c2f99eab72100d1e90cf7532d8f4e721b27521d107fb3f62",
  "error": null,
  "$type": "License"
}
```

