Skip to content

Latest commit

 

History

History
158 lines (109 loc) · 5.73 KB

VersionsApi.md

File metadata and controls

158 lines (109 loc) · 5.73 KB

openproject_dart_sdk.api.VersionsApi

Load the API package

import 'package:openproject_dart_sdk/api.dart';

All URIs are relative to http://localhost

Method HTTP request Description
apiV3ProjectsProjectIdVersionsGet GET /api/v3/projects/{project_id}/versions List versions available in a project
apiV3VersionsGet GET /api/v3/versions List versions
apiV3VersionsIdGet GET /api/v3/versions/{id} View version

apiV3ProjectsProjectIdVersionsGet

Versions apiV3ProjectsProjectIdVersionsGet(projectId)

List versions available in a project

This endpoint lists the versions that are available in a given project. Note that due to sharing this might be more than the versions defined by that project.

Example

import 'package:openproject_dart_sdk/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure OAuth2 access token for authorization: oAuth
//defaultApiClient.getAuthentication<OAuth>('oAuth').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = VersionsApi();
final projectId = 56; // int | ID of the project whoose versions will be listed

try {
    final result = api_instance.apiV3ProjectsProjectIdVersionsGet(projectId);
    print(result);
} catch (e) {
    print('Exception when calling VersionsApi->apiV3ProjectsProjectIdVersionsGet: $e\n');
}

Parameters

Name Type Description Notes
projectId int ID of the project whoose versions will be listed

Return type

Versions

Authorization

basicAuth, oAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/hal+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiV3VersionsGet

Versions apiV3VersionsGet(filters)

List versions

Returns a collection of versions. The client can choose to filter the versions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain versions, for which the requesting client has sufficient permissions (view_work_packages).

Example

import 'package:openproject_dart_sdk/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure OAuth2 access token for authorization: oAuth
//defaultApiClient.getAuthentication<OAuth>('oAuth').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = VersionsApi();
final filters = filters_example; // String | JSON specifying filter conditions. Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:  + sharing: filters versions by how they are shared within the server (*none*, *descendants*, *hierarchy*, *tree*, *system*).

try {
    final result = api_instance.apiV3VersionsGet(filters);
    print(result);
} catch (e) {
    print('Exception when calling VersionsApi->apiV3VersionsGet: $e\n');
}

Parameters

Name Type Description Notes
filters String JSON specifying filter conditions. Accepts the same format as returned by the queries endpoint. Currently supported filters are: + sharing: filters versions by how they are shared within the server (none, descendants, hierarchy, tree, system). [optional]

Return type

Versions

Authorization

basicAuth, oAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/hal+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiV3VersionsIdGet

Version apiV3VersionsIdGet(id)

View version

Example

import 'package:openproject_dart_sdk/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure OAuth2 access token for authorization: oAuth
//defaultApiClient.getAuthentication<OAuth>('oAuth').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = VersionsApi();
final id = 56; // int | version id

try {
    final result = api_instance.apiV3VersionsIdGet(id);
    print(result);
} catch (e) {
    print('Exception when calling VersionsApi->apiV3VersionsIdGet: $e\n');
}

Parameters

Name Type Description Notes
id int version id

Return type

Version

Authorization

basicAuth, oAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/hal+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]