getProject method

Future<Project> getProject({
  1. required String projectIdOrKey,
  2. String? expand,
  3. List<String>? properties,
})

Returns the project details for a project.

This operation can be accessed anonymously.

Permissions required: Browse projects project permission for the project.

Implementation

Future<Project> getProject(
    {required String projectIdOrKey,
    String? expand,
    List<String>? properties}) async {
  return Project.fromJson(await _client.send(
    'get',
    'rest/api/3/project/{projectIdOrKey}',
    pathParameters: {
      'projectIdOrKey': projectIdOrKey,
    },
    queryParameters: {
      if (expand != null) 'expand': expand,
      if (properties != null)
        'properties': properties.map((e) => e).join(','),
    },
  ));
}