Skip to content

Latest commit

 

History

History
1595 lines (1024 loc) · 46.2 KB

File metadata and controls

1595 lines (1024 loc) · 46.2 KB

\DatasetsAPI

All URIs are relative to http://localhost

Method HTTP request Description
CountUniqueFields Get /api/v1/datasets/count/{field} DatasetController@count
CreateDatasets Post /api/v1/datasets DatasetController@store
CreateDatasetsV2 Post /api/v2/datasets DatasetController@store
CreateTeamDatasetsV2 Post /api/v2/teams/{teamId}/datasets TeamDatasetController@store
DeleteDatasets Delete /api/v1/datasets/{id} DatasetController@destroy
DeleteDatasetsV2 Delete /api/v2/datasets/{id} Delete a dataset
DeleteTeamDatasetsV2 Delete /api/v2/teams/{teamId}/datasets/{id} TeamDatasetController@destroy
ExportDatasetMetadata Get /api/v1/datasets/export_metadata/{id} DatasetController@exportMetadata
ExportDatasets Get /api/v1/datasets/export DatasetController@export
ExportDur Get /api/v1/dur/export DurController@export
ExportMockDataset Get /api/v1/datasets/export/mock DatasetController@exportMock
ExportMockDatasetV2 Get /api/v2/datasets/export/mock DatasetController@exportMock
FetchAllDatasets Get /api/v1/datasets DatasetController@index
FetchAllDatasetsV2 Get /api/v2/datasets DatasetController@index
FetchDatasets Get /api/v1/datasets/{id} DatasetController@show
FetchDatasetsV2 Get /api/v2/datasets/{id} DatasetController@showActive
PatchDatasets Patch /api/v1/datasets/{id} DatasetController@edit
PatchDatasetsV2 Patch /api/v2/datasets/{id} DatasetController@edit
PatchTeamDatasetsV2 Patch /api/v2/teams/{teamId}/datasets/{id} TeamDatasetController@edit
UpdateDatasets Put /api/v1/datasets/{id} DatasetController@update
UpdateDatasetsV2 Put /api/v2/datasets/{id} DatasetController@update
UpdateTeamDatasetsV2 Put /api/v2/teams/{teamId}/datasets/{id} TeamDatasetController@update

CountUniqueFields

CountUniqueFieldsCollections200Response CountUniqueFields(ctx, field).TeamId(teamId).Execute()

DatasetController@count

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	field := "status" // string | name of the field to perform a count on
	teamId := int32(1) // int32 | team id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.CountUniqueFields(context.Background(), field).TeamId(teamId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.CountUniqueFields``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CountUniqueFields`: CountUniqueFieldsCollections200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.CountUniqueFields`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
field string name of the field to perform a count on

Other Parameters

Other parameters are passed through a pointer to a apiCountUniqueFieldsRequest struct via the builder pattern

Name Type Description Notes

teamId | int32 | team id |

Return type

CountUniqueFieldsCollections200Response

Authorization

bearerAuth

HTTP request headers

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

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

CreateDatasets

CreateDarIntegration201Response CreateDatasets(ctx).CreateDatasetsRequest(createDatasetsRequest).Execute()

DatasetController@store

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	createDatasetsRequest := *openapiclient.NewCreateDatasetsRequest() // CreateDatasetsRequest | Pass user credentials

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.CreateDatasets(context.Background()).CreateDatasetsRequest(createDatasetsRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.CreateDatasets``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateDatasets`: CreateDarIntegration201Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.CreateDatasets`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateDatasetsRequest struct via the builder pattern

Name Type Description Notes
createDatasetsRequest CreateDatasetsRequest Pass user credentials

Return type

CreateDarIntegration201Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

CreateDatasetsV2

CreateDarIntegration201Response CreateDatasetsV2(ctx).UpdateDatasetsRequest(updateDatasetsRequest).Execute()

DatasetController@store

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	updateDatasetsRequest := *openapiclient.NewUpdateDatasetsRequest() // UpdateDatasetsRequest | Pass user credentials

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.CreateDatasetsV2(context.Background()).UpdateDatasetsRequest(updateDatasetsRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.CreateDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateDatasetsV2`: CreateDarIntegration201Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.CreateDatasetsV2`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateDatasetsV2Request struct via the builder pattern

Name Type Description Notes
updateDatasetsRequest UpdateDatasetsRequest Pass user credentials

Return type

CreateDarIntegration201Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

CreateTeamDatasetsV2

CreateDarIntegration201Response CreateTeamDatasetsV2(ctx, teamId).PatchDatasetsV2Request(patchDatasetsV2Request).Execute()

TeamDatasetController@store

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	teamId := int32(1) // int32 | team id
	patchDatasetsV2Request := *openapiclient.NewPatchDatasetsV2Request() // PatchDatasetsV2Request | Pass user credentials

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.CreateTeamDatasetsV2(context.Background(), teamId).PatchDatasetsV2Request(patchDatasetsV2Request).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.CreateTeamDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateTeamDatasetsV2`: CreateDarIntegration201Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.CreateTeamDatasetsV2`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamId int32 team id

Other Parameters

Other parameters are passed through a pointer to a apiCreateTeamDatasetsV2Request struct via the builder pattern

Name Type Description Notes

patchDatasetsV2Request | PatchDatasetsV2Request | Pass user credentials |

Return type

CreateDarIntegration201Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

DeleteDatasets

DeleteApplications200Response DeleteDatasets(ctx, id).Execute()

DatasetController@destroy

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	id := int32(1) // int32 | dataset id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.DeleteDatasets(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.DeleteDatasets``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeleteDatasets`: DeleteApplications200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.DeleteDatasets`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiDeleteDatasetsRequest struct via the builder pattern

Name Type Description Notes

Return type

DeleteApplications200Response

Authorization

bearerAuth

HTTP request headers

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

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

DeleteDatasetsV2

DeleteApplications200Response DeleteDatasetsV2(ctx, id).Execute()

Delete a dataset

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	id := int32(1) // int32 | dataset id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.DeleteDatasetsV2(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.DeleteDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeleteDatasetsV2`: DeleteApplications200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.DeleteDatasetsV2`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiDeleteDatasetsV2Request struct via the builder pattern

Name Type Description Notes

Return type

DeleteApplications200Response

Authorization

bearerAuth

HTTP request headers

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

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

DeleteTeamDatasetsV2

DeleteApplications200Response DeleteTeamDatasetsV2(ctx, teamId, id).Execute()

TeamDatasetController@destroy

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	teamId := int32(1) // int32 | team id
	id := int32(1) // int32 | dataset id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.DeleteTeamDatasetsV2(context.Background(), teamId, id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.DeleteTeamDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeleteTeamDatasetsV2`: DeleteApplications200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.DeleteTeamDatasetsV2`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamId int32 team id
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiDeleteTeamDatasetsV2Request struct via the builder pattern

Name Type Description Notes

Return type

DeleteApplications200Response

Authorization

bearerAuth

HTTP request headers

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

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

ExportDatasetMetadata

string ExportDatasetMetadata(ctx, id).DownloadType(downloadType).Execute()

DatasetController@exportMetadata

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	id := int32(1) // int32 | dataset id
	downloadType := "structural" // string | download type

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.ExportDatasetMetadata(context.Background(), id).DownloadType(downloadType).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.ExportDatasetMetadata``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ExportDatasetMetadata`: string
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.ExportDatasetMetadata`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiExportDatasetMetadataRequest struct via the builder pattern

Name Type Description Notes

downloadType | string | download type |

Return type

string

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/csv, application/json

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

ExportDatasets

string ExportDatasets(ctx).TeamId(teamId).DatasetId(datasetId).Execute()

DatasetController@export

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	teamId := int32(1) // int32 | team id
	datasetId := int32(1) // int32 | dataset id (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.ExportDatasets(context.Background()).TeamId(teamId).DatasetId(datasetId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.ExportDatasets``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ExportDatasets`: string
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.ExportDatasets`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiExportDatasetsRequest struct via the builder pattern

Name Type Description Notes
teamId int32 team id
datasetId int32 dataset id

Return type

string

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/csv, application/json

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

ExportDur

string ExportDur(ctx).TeamId(teamId).DurId(durId).Execute()

DurController@export

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	teamId := int32(1) // int32 | team id
	durId := int32(1) // int32 | dur id (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.ExportDur(context.Background()).TeamId(teamId).DurId(durId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.ExportDur``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ExportDur`: string
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.ExportDur`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiExportDurRequest struct via the builder pattern

Name Type Description Notes
teamId int32 team id
durId int32 dur id

Return type

string

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/csv, application/json

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

ExportMockDataset

string ExportMockDataset(ctx).Type_(type_).Execute()

DatasetController@exportMock

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	type_ := "type__example" // string | type export

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.ExportMockDataset(context.Background()).Type_(type_).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.ExportMockDataset``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ExportMockDataset`: string
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.ExportMockDataset`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiExportMockDatasetRequest struct via the builder pattern

Name Type Description Notes
type_ string type export

Return type

string

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/csv, application/json

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

ExportMockDatasetV2

string ExportMockDatasetV2(ctx).Type_(type_).Execute()

DatasetController@exportMock

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	type_ := "type__example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.ExportMockDatasetV2(context.Background()).Type_(type_).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.ExportMockDatasetV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ExportMockDatasetV2`: string
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.ExportMockDatasetV2`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiExportMockDatasetV2Request struct via the builder pattern

Name Type Description Notes
type_ string

Return type

string

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/csv, application/json

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

FetchAllDatasets

FetchAllDatasets200Response FetchAllDatasets(ctx).TeamId(teamId).Pid(pid).Sort(sort).Title(title).Status(status).Execute()

DatasetController@index

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	teamId := int32(1) // int32 | team id
	pid := "aa588d1c-21e7-42d9-9b60-48e3d6b784a9" // string | get based on a pid (optional)
	sort := "created:desc" // string | Field and direction (colon separated) to sort by (default: 'created:desc') ... <br/> <br/>         - ?sort=\\<field\\>:\\<direction\\> <br/>         - \\<direction\\> can only be 'asc' or 'desc'  <br/>         - \\<field\\> can only be a valid field for the dataset table that can be ordered on  <br/>         - \\<field\\> can start with the prefix 'metadata.' so that nested values within the field 'metadata'  <br/>             (represented by the GWDM JSON structure) can be used to order on.  <br/>  <br/> (optional)
	title := "hdr" // string | Three or more characters to filter dataset titles by (optional)
	status := "ACTIVE" // string | Dataset status to filter by ('ACTIVE', 'DRAFT', 'ARCHIVED') (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.FetchAllDatasets(context.Background()).TeamId(teamId).Pid(pid).Sort(sort).Title(title).Status(status).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.FetchAllDatasets``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `FetchAllDatasets`: FetchAllDatasets200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.FetchAllDatasets`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiFetchAllDatasetsRequest struct via the builder pattern

Name Type Description Notes
teamId int32 team id
pid string get based on a pid
sort string Field and direction (colon separated) to sort by (default: 'created:desc') ... <br/> <br/> - ?sort=\<field\>:\<direction\> <br/> - \<direction\> can only be 'asc' or 'desc' <br/> - \<field\> can only be a valid field for the dataset table that can be ordered on <br/> - \<field\> can start with the prefix 'metadata.' so that nested values within the field 'metadata' <br/> (represented by the GWDM JSON structure) can be used to order on. <br/> <br/>
title string Three or more characters to filter dataset titles by
status string Dataset status to filter by ('ACTIVE', 'DRAFT', 'ARCHIVED')

Return type

FetchAllDatasets200Response

Authorization

bearerAuth

HTTP request headers

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

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

FetchAllDatasetsV2

FetchAllDatasets200Response FetchAllDatasetsV2(ctx).Sort(sort).Title(title).Status(status).WithMetadata(withMetadata).Execute()

DatasetController@index

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	sort := "created:desc" // string | Field and direction (colon separated) to sort by (default: 'created:desc') ... <br/> <br/>         - ?sort=\\<field\\>:\\<direction\\> <br/>         - \\<direction\\> can only be 'asc' or 'desc'  <br/>         - \\<field\\> can only be a valid field for the dataset table that can be ordered on  <br/>         - \\<field\\> can start with the prefix 'metadata.' so that nested values within the field 'metadata'  <br/>             (represented by the GWDM JSON structure) can be used to order on.  <br/>  <br/> (optional)
	title := "hdr" // string | Three or more characters to filter dataset titles by (optional)
	status := "ACTIVE" // string | Dataset status to filter by ('ACTIVE', 'DRAFT', 'ARCHIVED') (optional)
	withMetadata := "true" // string | Boolean whether to return dataset metadata (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.FetchAllDatasetsV2(context.Background()).Sort(sort).Title(title).Status(status).WithMetadata(withMetadata).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.FetchAllDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `FetchAllDatasetsV2`: FetchAllDatasets200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.FetchAllDatasetsV2`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiFetchAllDatasetsV2Request struct via the builder pattern

Name Type Description Notes
sort string Field and direction (colon separated) to sort by (default: 'created:desc') ... <br/> <br/> - ?sort=\<field\>:\<direction\> <br/> - \<direction\> can only be 'asc' or 'desc' <br/> - \<field\> can only be a valid field for the dataset table that can be ordered on <br/> - \<field\> can start with the prefix 'metadata.' so that nested values within the field 'metadata' <br/> (represented by the GWDM JSON structure) can be used to order on. <br/> <br/>
title string Three or more characters to filter dataset titles by
status string Dataset status to filter by ('ACTIVE', 'DRAFT', 'ARCHIVED')
withMetadata string Boolean whether to return dataset metadata

Return type

FetchAllDatasets200Response

Authorization

bearerAuth

HTTP request headers

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

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

FetchDatasets

FetchDatasets200Response FetchDatasets(ctx, id).Export(export).SchemaModel(schemaModel).SchemaVersion(schemaVersion).Execute()

DatasetController@show

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	id := int32(1) // int32 | dataset id
	export := "structuralMetadata" // string | Alternative output schema model. (optional)
	schemaModel := "schemaModel_example" // string | Alternative output schema model. (optional)
	schemaVersion := "schemaVersion_example" // string | Alternative output schema version. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.FetchDatasets(context.Background(), id).Export(export).SchemaModel(schemaModel).SchemaVersion(schemaVersion).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.FetchDatasets``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `FetchDatasets`: FetchDatasets200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.FetchDatasets`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiFetchDatasetsRequest struct via the builder pattern

Name Type Description Notes

export | string | Alternative output schema model. | schemaModel | string | Alternative output schema model. | schemaVersion | string | Alternative output schema version. |

Return type

FetchDatasets200Response

Authorization

bearerAuth

HTTP request headers

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

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

FetchDatasetsV2

FetchDatasets200Response FetchDatasetsV2(ctx, id).Export(export).SchemaModel(schemaModel).SchemaVersion(schemaVersion).Execute()

DatasetController@showActive

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	id := int32(1) // int32 | dataset id
	export := "structuralMetadata" // string | Set to 'structuralMetadata' to download as CSV. (optional)
	schemaModel := "schemaModel_example" // string | Alternative output schema model. (optional)
	schemaVersion := "schemaVersion_example" // string | Alternative output schema version. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.FetchDatasetsV2(context.Background(), id).Export(export).SchemaModel(schemaModel).SchemaVersion(schemaVersion).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.FetchDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `FetchDatasetsV2`: FetchDatasets200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.FetchDatasetsV2`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiFetchDatasetsV2Request struct via the builder pattern

Name Type Description Notes

export | string | Set to 'structuralMetadata' to download as CSV. | schemaModel | string | Alternative output schema model. | schemaVersion | string | Alternative output schema version. |

Return type

FetchDatasets200Response

Authorization

bearerAuth

HTTP request headers

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

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

PatchDatasets

DeleteApplications200Response PatchDatasets(ctx, id).Unarchive(unarchive).Execute()

DatasetController@edit

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	id := int32(1) // int32 | dataset id
	unarchive := "unarchive_example" // string | Unarchive a dataset (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.PatchDatasets(context.Background(), id).Unarchive(unarchive).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.PatchDatasets``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PatchDatasets`: DeleteApplications200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.PatchDatasets`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiPatchDatasetsRequest struct via the builder pattern

Name Type Description Notes

unarchive | string | Unarchive a dataset |

Return type

DeleteApplications200Response

Authorization

bearerAuth

HTTP request headers

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

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

PatchDatasetsV2

DeleteApplications200Response PatchDatasetsV2(ctx, id).PatchDatasetsV2Request(patchDatasetsV2Request).Execute()

DatasetController@edit

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	id := int32(1) // int32 | dataset id
	patchDatasetsV2Request := *openapiclient.NewPatchDatasetsV2Request() // PatchDatasetsV2Request | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.PatchDatasetsV2(context.Background(), id).PatchDatasetsV2Request(patchDatasetsV2Request).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.PatchDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PatchDatasetsV2`: DeleteApplications200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.PatchDatasetsV2`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiPatchDatasetsV2Request struct via the builder pattern

Name Type Description Notes

patchDatasetsV2Request | PatchDatasetsV2Request | |

Return type

DeleteApplications200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

PatchTeamDatasetsV2

DeleteApplications200Response PatchTeamDatasetsV2(ctx, teamId, id).PatchDatasetsV2Request(patchDatasetsV2Request).Execute()

TeamDatasetController@edit

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	teamId := int32(1) // int32 | team id
	id := int32(1) // int32 | dataset id
	patchDatasetsV2Request := *openapiclient.NewPatchDatasetsV2Request() // PatchDatasetsV2Request | Pass user credentials

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.PatchTeamDatasetsV2(context.Background(), teamId, id).PatchDatasetsV2Request(patchDatasetsV2Request).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.PatchTeamDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PatchTeamDatasetsV2`: DeleteApplications200Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.PatchTeamDatasetsV2`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamId int32 team id
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiPatchTeamDatasetsV2Request struct via the builder pattern

Name Type Description Notes

patchDatasetsV2Request | PatchDatasetsV2Request | Pass user credentials |

Return type

DeleteApplications200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

UpdateDatasets

CreateDarIntegration201Response UpdateDatasets(ctx, id).UpdateDatasetsRequest(updateDatasetsRequest).Execute()

DatasetController@update

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	id := int32(1) // int32 | dataset id
	updateDatasetsRequest := *openapiclient.NewUpdateDatasetsRequest() // UpdateDatasetsRequest | Pass user credentials

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.UpdateDatasets(context.Background(), id).UpdateDatasetsRequest(updateDatasetsRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.UpdateDatasets``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `UpdateDatasets`: CreateDarIntegration201Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.UpdateDatasets`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiUpdateDatasetsRequest struct via the builder pattern

Name Type Description Notes

updateDatasetsRequest | UpdateDatasetsRequest | Pass user credentials |

Return type

CreateDarIntegration201Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

UpdateDatasetsV2

CreateDarIntegration201Response UpdateDatasetsV2(ctx, id).UpdateDatasetsRequest(updateDatasetsRequest).Execute()

DatasetController@update

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	id := int32(1) // int32 | dataset id
	updateDatasetsRequest := *openapiclient.NewUpdateDatasetsRequest() // UpdateDatasetsRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.UpdateDatasetsV2(context.Background(), id).UpdateDatasetsRequest(updateDatasetsRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.UpdateDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `UpdateDatasetsV2`: CreateDarIntegration201Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.UpdateDatasetsV2`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiUpdateDatasetsV2Request struct via the builder pattern

Name Type Description Notes

updateDatasetsRequest | UpdateDatasetsRequest | |

Return type

CreateDarIntegration201Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

UpdateTeamDatasetsV2

CreateDarIntegration201Response UpdateTeamDatasetsV2(ctx, teamId, id).PatchDatasetsV2Request(patchDatasetsV2Request).Execute()

TeamDatasetController@update

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)

func main() {
	teamId := int32(1) // int32 | team id
	id := int32(1) // int32 | dataset id
	patchDatasetsV2Request := *openapiclient.NewPatchDatasetsV2Request() // PatchDatasetsV2Request | Pass user credentials

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DatasetsAPI.UpdateTeamDatasetsV2(context.Background(), teamId, id).PatchDatasetsV2Request(patchDatasetsV2Request).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatasetsAPI.UpdateTeamDatasetsV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `UpdateTeamDatasetsV2`: CreateDarIntegration201Response
	fmt.Fprintf(os.Stdout, "Response from `DatasetsAPI.UpdateTeamDatasetsV2`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamId int32 team id
id int32 dataset id

Other Parameters

Other parameters are passed through a pointer to a apiUpdateTeamDatasetsV2Request struct via the builder pattern

Name Type Description Notes

patchDatasetsV2Request | PatchDatasetsV2Request | Pass user credentials |

Return type

CreateDarIntegration201Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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