All URIs are relative to https://yasm.prodyna.com:443/api/graph/v1
Method | HTTP request | Description |
---|---|---|
AddOrganizationOffice | Post /organizations/{organizationId}/offices/{officeId} | Assign an office to an organization |
CreateOffice | Post /offices | Create an Office in an Organization |
DeleteOffice | Delete /offices/{officeId} | Delete an Office |
DeleteOfficeCountry | Delete /offices/{officeId}/countries/{countryId} | Delete the office from a Person |
DeleteOrganizationOffice | Delete /organizations/{organizationId}/offices/{officeId} | Delete an office from an organization |
DeletePersonOffice | Delete /persons/{personId}/offices/{officeId} | Delete the office from a Person |
GetOfficeDetails | Get /offices/{officeId} | Get details about an Office |
SearchOffices | Post /offices/search | Search over offices |
UpdateOffice | Put /offices/{officeId} | Update an Office |
UpdateOfficeCountry | Put /offices/{officeId}/countries/{countryId} | Assign a country to an office |
UpdatePersonOffice | Put /persons/{personId}/offices/{officeId} | Assign a person to an office |
OrganizationDetails AddOrganizationOffice(ctx, organizationId, officeId).Execute()
Assign an office to an organization
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
organizationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
officeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.AddOrganizationOffice(context.Background(), organizationId, officeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.AddOrganizationOffice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddOrganizationOffice`: OrganizationDetails
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.AddOrganizationOffice`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string | ||
officeId | string |
Other parameters are passed through a pointer to a apiAddOrganizationOfficeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OfficeDetails CreateOffice(ctx).Office(office).Execute()
Create an Office in an Organization
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
office := *openapiclient.NewOffice("Id_example", "Name_example") // Office |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.CreateOffice(context.Background()).Office(office).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.CreateOffice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateOffice`: OfficeDetails
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.CreateOffice`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateOfficeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
office | Office |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Status DeleteOffice(ctx, officeId).Execute()
Delete an Office
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
officeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.DeleteOffice(context.Background(), officeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.DeleteOffice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteOffice`: Status
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.DeleteOffice`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
officeId | string |
Other parameters are passed through a pointer to a apiDeleteOfficeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OfficeDetails DeleteOfficeCountry(ctx, officeId, countryId).Execute()
Delete the office from a Person
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
officeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
countryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.DeleteOfficeCountry(context.Background(), officeId, countryId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.DeleteOfficeCountry``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteOfficeCountry`: OfficeDetails
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.DeleteOfficeCountry`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
officeId | string | ||
countryId | string |
Other parameters are passed through a pointer to a apiDeleteOfficeCountryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationDetails DeleteOrganizationOffice(ctx, organizationId, officeId).Execute()
Delete an office from an organization
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
organizationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
officeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.DeleteOrganizationOffice(context.Background(), organizationId, officeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.DeleteOrganizationOffice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteOrganizationOffice`: OrganizationDetails
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.DeleteOrganizationOffice`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
organizationId | string | ||
officeId | string |
Other parameters are passed through a pointer to a apiDeleteOrganizationOfficeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PersonDetails DeletePersonOffice(ctx, personId, officeId).Execute()
Delete the office from a Person
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
personId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
officeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.DeletePersonOffice(context.Background(), personId, officeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.DeletePersonOffice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeletePersonOffice`: PersonDetails
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.DeletePersonOffice`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
personId | string | ||
officeId | string |
Other parameters are passed through a pointer to a apiDeletePersonOfficeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OfficeDetails GetOfficeDetails(ctx, officeId).Execute()
Get details about an Office
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
officeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.GetOfficeDetails(context.Background(), officeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.GetOfficeDetails``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOfficeDetails`: OfficeDetails
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.GetOfficeDetails`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
officeId | string |
Other parameters are passed through a pointer to a apiGetOfficeDetailsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PagedOffices SearchOffices(ctx).OfficeSearch(officeSearch).Execute()
Search over offices
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
officeSearch := *openapiclient.NewOfficeSearch(int32(123), int32(123)) // OfficeSearch | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.SearchOffices(context.Background()).OfficeSearch(officeSearch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.SearchOffices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SearchOffices`: PagedOffices
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.SearchOffices`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiSearchOfficesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
officeSearch | OfficeSearch |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OfficeDetails UpdateOffice(ctx, officeId).Office(office).Execute()
Update an Office
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
officeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
office := *openapiclient.NewOffice("Id_example", "Name_example") // Office |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.UpdateOffice(context.Background(), officeId).Office(office).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.UpdateOffice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateOffice`: OfficeDetails
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.UpdateOffice`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
officeId | string |
Other parameters are passed through a pointer to a apiUpdateOfficeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
office | Office | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OfficeDetails UpdateOfficeCountry(ctx, officeId, countryId).Execute()
Assign a country to an office
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
officeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
countryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.UpdateOfficeCountry(context.Background(), officeId, countryId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.UpdateOfficeCountry``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateOfficeCountry`: OfficeDetails
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.UpdateOfficeCountry`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
officeId | string | ||
countryId | string |
Other parameters are passed through a pointer to a apiUpdateOfficeCountryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PersonDetails UpdatePersonOffice(ctx, personId, officeId).Execute()
Assign a person to an office
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
personId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
officeId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OfficeAPI.UpdatePersonOffice(context.Background(), personId, officeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OfficeAPI.UpdatePersonOffice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdatePersonOffice`: PersonDetails
fmt.Fprintf(os.Stdout, "Response from `OfficeAPI.UpdatePersonOffice`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
personId | string | ||
officeId | string |
Other parameters are passed through a pointer to a apiUpdatePersonOfficeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]