Skip to content

Latest commit

 

History

History
281 lines (176 loc) · 6.91 KB

File metadata and controls

281 lines (176 loc) · 6.91 KB

\SubjectApi

All URIs are relative to http://localhost

Method HTTP request Description
CreateSubject Put /security/subjects/{subject} Create a subject
DeleteSubject Delete /security/subjects/{subject} Delete a subject
GetSubject Get /security/subjects/{subject} Get subject
ListSubjects Get /security/subjects List subjects

CreateSubject

CreateSubject(ctx, subject).CreateSubject(createSubject).Execute()

Create a subject

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    subject := "subject_example" // string | 
    createSubject := *openapiclient.NewCreateSubject("Query_example", "Version_example") // CreateSubject | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SubjectApi.CreateSubject(context.Background(), subject).CreateSubject(createSubject).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SubjectApi.CreateSubject``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
subject string

Other Parameters

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

Name Type Description Notes

createSubject | CreateSubject | |

Return type

(empty response body)

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

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

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

DeleteSubject

DeleteSubject(ctx, subject).Execute()

Delete a subject

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    subject := "subject_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SubjectApi.DeleteSubject(context.Background(), subject).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SubjectApi.DeleteSubject``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
subject string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

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

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

GetSubject

SubjectConfig GetSubject(ctx, subject).Execute()

Get subject

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    subject := "subject_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
subject string

Other Parameters

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

Name Type Description Notes

Return type

SubjectConfig

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

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

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

ListSubjects

[]SubjectConfig ListSubjects(ctx).Execute()

List subjects

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]SubjectConfig

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

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

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