All URIs are relative to https://octopus.codio.com
| Method | HTTP request | Description |
|---|---|---|
| AssessmentLibraryCreateAssessment | Post /api/v1/assessment_library/{libraryId}/assessment | Create assessment |
| AssessmentLibraryGetAssessment | Get /api/v1/assessment_library/{libraryId}/assessment/{id} | Get assessment |
| AssessmentLibrarySearch | Get /api/v1/assessment_library/{libraryId}/assessment | Search assessments |
| AssessmentLibraryUpdateAssessment | Put /api/v1/assessment_library/{libraryId}/assessment/{id} | Update assessment |
| ListLibraries | Get /api/v1/assessment_library | List assessment libraries |
string AssessmentLibraryCreateAssessment(ctx, libraryId).Bundle(bundle).Assessment(assessment).Execute()
Create assessment
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/codio/codio-api-go"
)
func main() {
libraryId := "libraryId_example" // string | Library id
bundle := os.NewFile(1234, "some_file") // *os.File | Optional file archive data to be published (optional)
assessment := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssessmentLibrariesAPIAPI.AssessmentLibraryCreateAssessment(context.Background(), libraryId).Bundle(bundle).Assessment(assessment).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssessmentLibrariesAPIAPI.AssessmentLibraryCreateAssessment``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AssessmentLibraryCreateAssessment`: string
fmt.Fprintf(os.Stdout, "Response from `AssessmentLibrariesAPIAPI.AssessmentLibraryCreateAssessment`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| libraryId | string | Library id |
Other parameters are passed through a pointer to a apiAssessmentLibraryCreateAssessmentRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
bundle | *os.File | Optional file archive data to be published | assessment | map[string]interface{} | |
string
- Content-Type: multipart/form-data, application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string AssessmentLibraryGetAssessment(ctx, libraryId, id).Execute()
Get assessment
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/codio/codio-api-go"
)
func main() {
libraryId := "libraryId_example" // string | Library id
id := "id_example" // string | Assessment id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssessmentLibrariesAPIAPI.AssessmentLibraryGetAssessment(context.Background(), libraryId, id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssessmentLibrariesAPIAPI.AssessmentLibraryGetAssessment``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AssessmentLibraryGetAssessment`: string
fmt.Fprintf(os.Stdout, "Response from `AssessmentLibrariesAPIAPI.AssessmentLibraryGetAssessment`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| libraryId | string | Library id | |
| id | string | Assessment id |
Other parameters are passed through a pointer to a apiAssessmentLibraryGetAssessmentRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SocrateAnswerExample AssessmentLibrarySearch(ctx, libraryId).Count(count).Offset(offset).Free(free).Execute()
Search assessments
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/codio/codio-api-go"
)
func main() {
libraryId := "libraryId_example" // string | Library id
count := "count_example" // string | Optional count parameter (optional)
offset := "offset_example" // string | Optional offset parameter (optional)
free := *openapiclient.NewSocrateTagSearchExample() // SocrateTagSearchExample | Free form tag search is allowed (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssessmentLibrariesAPIAPI.AssessmentLibrarySearch(context.Background(), libraryId).Count(count).Offset(offset).Free(free).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssessmentLibrariesAPIAPI.AssessmentLibrarySearch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AssessmentLibrarySearch`: SocrateAnswerExample
fmt.Fprintf(os.Stdout, "Response from `AssessmentLibrariesAPIAPI.AssessmentLibrarySearch`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| libraryId | string | Library id |
Other parameters are passed through a pointer to a apiAssessmentLibrarySearchRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
count | string | Optional count parameter | offset | string | Optional offset parameter | free | SocrateTagSearchExample | Free form tag search is allowed |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string AssessmentLibraryUpdateAssessment(ctx, libraryId, id).Bundle(bundle).Assessment(assessment).Execute()
Update assessment
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/codio/codio-api-go"
)
func main() {
libraryId := "libraryId_example" // string | Library id
id := "id_example" // string | Assessment id
bundle := os.NewFile(1234, "some_file") // *os.File | Optional file archive data to be published (optional)
assessment := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssessmentLibrariesAPIAPI.AssessmentLibraryUpdateAssessment(context.Background(), libraryId, id).Bundle(bundle).Assessment(assessment).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssessmentLibrariesAPIAPI.AssessmentLibraryUpdateAssessment``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AssessmentLibraryUpdateAssessment`: string
fmt.Fprintf(os.Stdout, "Response from `AssessmentLibrariesAPIAPI.AssessmentLibraryUpdateAssessment`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| libraryId | string | Library id | |
| id | string | Assessment id |
Other parameters are passed through a pointer to a apiAssessmentLibraryUpdateAssessmentRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
bundle | *os.File | Optional file archive data to be published | assessment | map[string]interface{} | |
string
- Content-Type: multipart/form-data, application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]SocratesLibrary ListLibraries(ctx).Execute()
List assessment libraries
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/codio/codio-api-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssessmentLibrariesAPIAPI.ListLibraries(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssessmentLibrariesAPIAPI.ListLibraries``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListLibraries`: []SocratesLibrary
fmt.Fprintf(os.Stdout, "Response from `AssessmentLibrariesAPIAPI.ListLibraries`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListLibrariesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]