13 KiB
Generated
\RelationshipApi
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| CheckOplSyntax | Post /opl/syntax/check | Check the syntax of an OPL file |
| CreateRelationship | Put /admin/relation-tuples | Create a Relationship |
| DeleteRelationships | Delete /admin/relation-tuples | Delete Relationships |
| GetRelationships | Get /relation-tuples | Query relationships |
| ListRelationshipNamespaces | Get /namespaces | Query namespaces |
| PatchRelationships | Patch /admin/relation-tuples | Patch Multiple Relationships |
CheckOplSyntax
CheckOplSyntaxResult CheckOplSyntax(ctx).Body(body).Execute()
Check the syntax of an OPL file
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
body := "body_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RelationshipApi.CheckOplSyntax(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.CheckOplSyntax``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CheckOplSyntax`: CheckOplSyntaxResult
fmt.Fprintf(os.Stdout, "Response from `RelationshipApi.CheckOplSyntax`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiCheckOplSyntaxRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| body | string |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateRelationship
Relationship CreateRelationship(ctx).CreateRelationshipBody(createRelationshipBody).Execute()
Create a Relationship
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
createRelationshipBody := *openapiclient.NewCreateRelationshipBody() // CreateRelationshipBody | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RelationshipApi.CreateRelationship(context.Background()).CreateRelationshipBody(createRelationshipBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.CreateRelationship``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateRelationship`: Relationship
fmt.Fprintf(os.Stdout, "Response from `RelationshipApi.CreateRelationship`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiCreateRelationshipRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createRelationshipBody | CreateRelationshipBody |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteRelationships
DeleteRelationships(ctx).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute()
Delete Relationships
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
namespace := "namespace_example" // string | Namespace of the Relationship (optional)
object := "object_example" // string | Object of the Relationship (optional)
relation := "relation_example" // string | Relation of the Relationship (optional)
subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional)
subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional)
subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional)
subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RelationshipApi.DeleteRelationships(context.Background()).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.DeleteRelationships``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDeleteRelationshipsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| namespace | string | Namespace of the Relationship | |
| object | string | Object of the Relationship | |
| relation | string | Relation of the Relationship | |
| subjectId | string | SubjectID of the Relationship | |
| subjectSetNamespace | string | Namespace of the Subject Set | |
| subjectSetObject | string | Object of the Subject Set | |
| subjectSetRelation | string | Relation of the Subject Set |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetRelationships
Relationships GetRelationships(ctx).PageSize(pageSize).PageToken(pageToken).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute()
Query relationships
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
pageSize := int64(789) // int64 | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). (optional) (default to 250)
pageToken := "pageToken_example" // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). (optional)
namespace := "namespace_example" // string | Namespace of the Relationship (optional)
object := "object_example" // string | Object of the Relationship (optional)
relation := "relation_example" // string | Relation of the Relationship (optional)
subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional)
subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional)
subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional)
subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RelationshipApi.GetRelationships(context.Background()).PageSize(pageSize).PageToken(pageToken).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.GetRelationships``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRelationships`: Relationships
fmt.Fprintf(os.Stdout, "Response from `RelationshipApi.GetRelationships`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiGetRelationshipsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| pageSize | int64 | Items per Page This is the number of items per page to return. For details on pagination please head over to the pagination documentation. | [default to 250] |
| pageToken | string | Next Page Token The next page token. For details on pagination please head over to the pagination documentation. | |
| namespace | string | Namespace of the Relationship | |
| object | string | Object of the Relationship | |
| relation | string | Relation of the Relationship | |
| subjectId | string | SubjectID of the Relationship | |
| subjectSetNamespace | string | Namespace of the Subject Set | |
| subjectSetObject | string | Object of the Subject Set | |
| subjectSetRelation | string | Relation of the Subject Set |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListRelationshipNamespaces
RelationshipNamespaces ListRelationshipNamespaces(ctx).Execute()
Query namespaces
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RelationshipApi.ListRelationshipNamespaces(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.ListRelationshipNamespaces``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListRelationshipNamespaces`: RelationshipNamespaces
fmt.Fprintf(os.Stdout, "Response from `RelationshipApi.ListRelationshipNamespaces`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiListRelationshipNamespacesRequest struct via the builder pattern
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PatchRelationships
PatchRelationships(ctx).RelationshipPatch(relationshipPatch).Execute()
Patch Multiple Relationships
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
relationshipPatch := []openapiclient.RelationshipPatch{*openapiclient.NewRelationshipPatch()} // []RelationshipPatch | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RelationshipApi.PatchRelationships(context.Background()).RelationshipPatch(relationshipPatch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.PatchRelationships``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiPatchRelationshipsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| relationshipPatch | []RelationshipPatch |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]