All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| createProjectGrant | POST /api/v1/project_grants | ProjectGrantController@store |
| fetchAllProjectGrants | GET /api/v1/project_grants | ProjectGrantController@index |
| fetchProjectGrant | GET /api/v1/project_grants/{id} | ProjectGrantController@show |
CreateProjectGrant201Response createProjectGrant()
ProjectGrantController@store
Create a project grant (and initial version)
// Import classes:
import uk.ac.hdruk.gatewayapi.ApiClient;
import uk.ac.hdruk.gatewayapi.ApiException;
import uk.ac.hdruk.gatewayapi.Configuration;
import uk.ac.hdruk.gatewayapi.auth.*;
import uk.ac.hdruk.gatewayapi.models.*;
import uk.ac.hdruk.gatewayapi.api.ProjectGrantApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
ProjectGrantApi apiInstance = new ProjectGrantApi(defaultClient);
try {
CreateProjectGrant201Response result = apiInstance.createProjectGrant();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectGrantApi#createProjectGrant");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Created | - |
FetchAllProjectGrants200Response fetchAllProjectGrants(pid, version, projectGrantName, userId, teamId, withRelated)
ProjectGrantController@index
Get all project grants
// Import classes:
import uk.ac.hdruk.gatewayapi.ApiClient;
import uk.ac.hdruk.gatewayapi.ApiException;
import uk.ac.hdruk.gatewayapi.Configuration;
import uk.ac.hdruk.gatewayapi.models.*;
import uk.ac.hdruk.gatewayapi.api.ProjectGrantApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
ProjectGrantApi apiInstance = new ProjectGrantApi(defaultClient);
String pid = "pid_example"; // String | Filter by dataset pid
Integer version = 56; // Integer | Filter by dataset version number
String projectGrantName = "projectGrantName_example"; // String | Filter by project grant name
Integer userId = 56; // Integer | Filter by owning user id
Integer teamId = 56; // Integer | Filter by owning team id
Boolean withRelated = true; // Boolean |
try {
FetchAllProjectGrants200Response result = apiInstance.fetchAllProjectGrants(pid, version, projectGrantName, userId, teamId, withRelated);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectGrantApi#fetchAllProjectGrants");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| pid | String | Filter by dataset pid | [optional] |
| version | Integer | Filter by dataset version number | [optional] |
| projectGrantName | String | Filter by project grant name | [optional] |
| userId | Integer | Filter by owning user id | [optional] |
| teamId | Integer | Filter by owning team id | [optional] |
| withRelated | Boolean | [optional] |
FetchAllProjectGrants200Response
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success response | - |
CountUniqueFieldsCollections200Response fetchProjectGrant(id, withRelated)
ProjectGrantController@show
Get a single project grant
// Import classes:
import uk.ac.hdruk.gatewayapi.ApiClient;
import uk.ac.hdruk.gatewayapi.ApiException;
import uk.ac.hdruk.gatewayapi.Configuration;
import uk.ac.hdruk.gatewayapi.models.*;
import uk.ac.hdruk.gatewayapi.api.ProjectGrantApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
ProjectGrantApi apiInstance = new ProjectGrantApi(defaultClient);
Integer id = 56; // Integer |
Boolean withRelated = true; // Boolean |
try {
CountUniqueFieldsCollections200Response result = apiInstance.fetchProjectGrant(id, withRelated);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectGrantApi#fetchProjectGrant");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | Integer | ||
| withRelated | Boolean | [optional] |
CountUniqueFieldsCollections200Response
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success response | - |