Skip to content

Latest commit

 

History

History
456 lines (331 loc) · 25.1 KB

SurveyQuestionsApi.md

File metadata and controls

456 lines (331 loc) · 25.1 KB

edfi_resources_sdk.api.SurveyQuestionsApi

Load the API package

import 'package:edfi_resources_sdk/api.dart';

All URIs are relative to https://api.ed-fi.org:443/v7.3/api/data/v3

Method HTTP request Description
deleteSurveyQuestionById DELETE /ed-fi/surveyQuestions/{id} Deletes an existing resource using the resource identifier.
deletesSurveyQuestions GET /ed-fi/surveyQuestions/deletes Retrieves deleted resources based on change version.
getSurveyQuestions GET /ed-fi/surveyQuestions Retrieves specific resources using the resource's property values (using the "Get" pattern).
getSurveyQuestionsById GET /ed-fi/surveyQuestions/{id} Retrieves a specific resource using the resource's identifier (using the "Get By Id" pattern).
getSurveyQuestionsPartitions GET /ed-fi/surveyQuestions/partitions Retrieves a set of page tokens to be used for efficient client-side parallel processing.
keyChangesSurveyQuestions GET /ed-fi/surveyQuestions/keyChanges Retrieves resources key changes based on change version.
postSurveyQuestion POST /ed-fi/surveyQuestions Creates or updates resources based on the natural key values of the supplied resource.
putSurveyQuestion PUT /ed-fi/surveyQuestions/{id} Updates a resource based on the resource identifier.

deleteSurveyQuestionById

deleteSurveyQuestionById(id, ifMatch)

Deletes an existing resource using the resource identifier.

The DELETE operation is used to delete an existing resource by identifier. If the resource doesn't exist, an error will result (the resource will not be found).

Example

import 'package:edfi_resources_sdk/api.dart';
// TODO Configure OAuth2 access token for authorization: oauth2_client_credentials
//defaultApiClient.getAuthentication<OAuth>('oauth2_client_credentials').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = SurveyQuestionsApi();
final id = id_example; // String | A resource identifier that uniquely identifies the resource.
final ifMatch = ifMatch_example; // String | The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.

try {
    api_instance.deleteSurveyQuestionById(id, ifMatch);
} catch (e) {
    print('Exception when calling SurveyQuestionsApi->deleteSurveyQuestionById: $e\n');
}

Parameters

Name Type Description Notes
id String A resource identifier that uniquely identifies the resource.
ifMatch String The ETag header value used to prevent the DELETE from removing a resource modified by another consumer. [optional]

Return type

void (empty response body)

Authorization

oauth2_client_credentials

HTTP request headers

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

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

deletesSurveyQuestions

List deletesSurveyQuestions(offset, limit, minChangeVersion, maxChangeVersion, totalCount, useSnapshot)

Retrieves deleted resources based on change version.

This operation is used to retrieve identifying information about resources that have been deleted.

Example

import 'package:edfi_resources_sdk/api.dart';
// TODO Configure OAuth2 access token for authorization: oauth2_client_credentials
//defaultApiClient.getAuthentication<OAuth>('oauth2_client_credentials').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = SurveyQuestionsApi();
final offset = 56; // int | Indicates how many items should be skipped before returning results.
final limit = 56; // int | Indicates the maximum number of items that should be returned in the results.
final minChangeVersion = 789; // int | Used in synchronization to set sequence minimum ChangeVersion
final maxChangeVersion = 789; // int | Used in synchronization to set sequence maximum ChangeVersion
final totalCount = true; // bool | Indicates if the total number of items available should be returned in the 'Total-Count' header of the response.  If set to false, 'Total-Count' header will not be provided. Must be false when using cursor paging (with pageToken).
final useSnapshot = true; // bool | Indicates if the configured Snapshot should be used.

try {
    final result = api_instance.deletesSurveyQuestions(offset, limit, minChangeVersion, maxChangeVersion, totalCount, useSnapshot);
    print(result);
} catch (e) {
    print('Exception when calling SurveyQuestionsApi->deletesSurveyQuestions: $e\n');
}

Parameters

Name Type Description Notes
offset int Indicates how many items should be skipped before returning results. [optional]
limit int Indicates the maximum number of items that should be returned in the results. [optional] [default to 25]
minChangeVersion int Used in synchronization to set sequence minimum ChangeVersion [optional]
maxChangeVersion int Used in synchronization to set sequence maximum ChangeVersion [optional]
totalCount bool Indicates if the total number of items available should be returned in the 'Total-Count' header of the response. If set to false, 'Total-Count' header will not be provided. Must be false when using cursor paging (with pageToken). [optional] [default to false]
useSnapshot bool Indicates if the configured Snapshot should be used. [optional] [default to false]

Return type

List

Authorization

oauth2_client_credentials

HTTP request headers

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

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

getSurveyQuestions

List getSurveyQuestions(offset, limit, pageToken, pageSize, minChangeVersion, maxChangeVersion, totalCount, questionCode, namespace, surveyIdentifier, surveySectionTitle, questionFormDescriptor, id, questionText, useSnapshot)

Retrieves specific resources using the resource's property values (using the "Get" pattern).

This GET operation provides access to resources using the "Get" search pattern. The values of any properties of the resource that are specified will be used to return all matching results (if it exists).

Example

import 'package:edfi_resources_sdk/api.dart';
// TODO Configure OAuth2 access token for authorization: oauth2_client_credentials
//defaultApiClient.getAuthentication<OAuth>('oauth2_client_credentials').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = SurveyQuestionsApi();
final offset = 56; // int | Indicates how many items should be skipped before returning results.
final limit = 56; // int | Indicates the maximum number of items that should be returned in the results.
final pageToken = pageToken_example; // String | The token of the page to retrieve, obtained either from the \"Next-Page-Token\" header of the previous request, or from the \"partitions\" endpoint for the resource. Cannot be used with limit/offset paging.
final pageSize = 56; // int | The maximum number of items to retrieve in the page. For use with pageToken (cursor paging) only.
final minChangeVersion = 789; // int | Used in synchronization to set sequence minimum ChangeVersion
final maxChangeVersion = 789; // int | Used in synchronization to set sequence maximum ChangeVersion
final totalCount = true; // bool | Indicates if the total number of items available should be returned in the 'Total-Count' header of the response.  If set to false, 'Total-Count' header will not be provided. Must be false when using cursor paging (with pageToken).
final questionCode = questionCode_example; // String | The identifying code for the question, unique for the survey.
final namespace = namespace_example; // String | Namespace for the survey.
final surveyIdentifier = surveyIdentifier_example; // String | The unique survey identifier from the survey tool.
final surveySectionTitle = surveySectionTitle_example; // String | The title or label for the survey section.
final questionFormDescriptor = questionFormDescriptor_example; // String | The form or type of question.
final id = id_example; // String | 
final questionText = questionText_example; // String | The text of the question.
final useSnapshot = true; // bool | Indicates if the configured Snapshot should be used.

try {
    final result = api_instance.getSurveyQuestions(offset, limit, pageToken, pageSize, minChangeVersion, maxChangeVersion, totalCount, questionCode, namespace, surveyIdentifier, surveySectionTitle, questionFormDescriptor, id, questionText, useSnapshot);
    print(result);
} catch (e) {
    print('Exception when calling SurveyQuestionsApi->getSurveyQuestions: $e\n');
}

Parameters

Name Type Description Notes
offset int Indicates how many items should be skipped before returning results. [optional]
limit int Indicates the maximum number of items that should be returned in the results. [optional] [default to 25]
pageToken String The token of the page to retrieve, obtained either from the "Next-Page-Token" header of the previous request, or from the "partitions" endpoint for the resource. Cannot be used with limit/offset paging. [optional]
pageSize int The maximum number of items to retrieve in the page. For use with pageToken (cursor paging) only. [optional] [default to 25]
minChangeVersion int Used in synchronization to set sequence minimum ChangeVersion [optional]
maxChangeVersion int Used in synchronization to set sequence maximum ChangeVersion [optional]
totalCount bool Indicates if the total number of items available should be returned in the 'Total-Count' header of the response. If set to false, 'Total-Count' header will not be provided. Must be false when using cursor paging (with pageToken). [optional] [default to false]
questionCode String The identifying code for the question, unique for the survey. [optional]
namespace String Namespace for the survey. [optional]
surveyIdentifier String The unique survey identifier from the survey tool. [optional]
surveySectionTitle String The title or label for the survey section. [optional]
questionFormDescriptor String The form or type of question. [optional]
id String [optional]
questionText String The text of the question. [optional]
useSnapshot bool Indicates if the configured Snapshot should be used. [optional] [default to false]

Return type

List

Authorization

oauth2_client_credentials

HTTP request headers

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

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

getSurveyQuestionsById

EdFiSurveyQuestion getSurveyQuestionsById(id, ifNoneMatch, useSnapshot)

Retrieves a specific resource using the resource's identifier (using the "Get By Id" pattern).

This GET operation retrieves a resource by the specified resource identifier.

Example

import 'package:edfi_resources_sdk/api.dart';
// TODO Configure OAuth2 access token for authorization: oauth2_client_credentials
//defaultApiClient.getAuthentication<OAuth>('oauth2_client_credentials').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = SurveyQuestionsApi();
final id = id_example; // String | A resource identifier that uniquely identifies the resource.
final ifNoneMatch = ifNoneMatch_example; // String | The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource.
final useSnapshot = true; // bool | Indicates if the configured Snapshot should be used.

try {
    final result = api_instance.getSurveyQuestionsById(id, ifNoneMatch, useSnapshot);
    print(result);
} catch (e) {
    print('Exception when calling SurveyQuestionsApi->getSurveyQuestionsById: $e\n');
}

Parameters

Name Type Description Notes
id String A resource identifier that uniquely identifies the resource.
ifNoneMatch String The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource. [optional]
useSnapshot bool Indicates if the configured Snapshot should be used. [optional] [default to false]

Return type

EdFiSurveyQuestion

Authorization

oauth2_client_credentials

HTTP request headers

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

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

getSurveyQuestionsPartitions

GetAcademicWeeksPartitions200Response getSurveyQuestionsPartitions(number, minChangeVersion, maxChangeVersion, questionCode, namespace, surveyIdentifier, surveySectionTitle, questionFormDescriptor, id, questionText, useSnapshot)

Retrieves a set of page tokens to be used for efficient client-side parallel processing.

Computes an evenly distributed set of partitions over the accessible data and returns a set of page tokens, each representing the first page of one of the partitions.

Example

import 'package:edfi_resources_sdk/api.dart';
// TODO Configure OAuth2 access token for authorization: oauth2_client_credentials
//defaultApiClient.getAuthentication<OAuth>('oauth2_client_credentials').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = SurveyQuestionsApi();
final number = 56; // int | The number of evenly distributed partitions to provide for client-side parallel processing. If unspecified, a reasonable set of partitions will be determined based on the total number of accessible items.
final minChangeVersion = 789; // int | Used in synchronization to set sequence minimum ChangeVersion
final maxChangeVersion = 789; // int | Used in synchronization to set sequence maximum ChangeVersion
final questionCode = questionCode_example; // String | The identifying code for the question, unique for the survey.
final namespace = namespace_example; // String | Namespace for the survey.
final surveyIdentifier = surveyIdentifier_example; // String | The unique survey identifier from the survey tool.
final surveySectionTitle = surveySectionTitle_example; // String | The title or label for the survey section.
final questionFormDescriptor = questionFormDescriptor_example; // String | The form or type of question.
final id = id_example; // String | 
final questionText = questionText_example; // String | The text of the question.
final useSnapshot = true; // bool | Indicates if the configured Snapshot should be used.

try {
    final result = api_instance.getSurveyQuestionsPartitions(number, minChangeVersion, maxChangeVersion, questionCode, namespace, surveyIdentifier, surveySectionTitle, questionFormDescriptor, id, questionText, useSnapshot);
    print(result);
} catch (e) {
    print('Exception when calling SurveyQuestionsApi->getSurveyQuestionsPartitions: $e\n');
}

Parameters

Name Type Description Notes
number int The number of evenly distributed partitions to provide for client-side parallel processing. If unspecified, a reasonable set of partitions will be determined based on the total number of accessible items. [optional]
minChangeVersion int Used in synchronization to set sequence minimum ChangeVersion [optional]
maxChangeVersion int Used in synchronization to set sequence maximum ChangeVersion [optional]
questionCode String The identifying code for the question, unique for the survey. [optional]
namespace String Namespace for the survey. [optional]
surveyIdentifier String The unique survey identifier from the survey tool. [optional]
surveySectionTitle String The title or label for the survey section. [optional]
questionFormDescriptor String The form or type of question. [optional]
id String [optional]
questionText String The text of the question. [optional]
useSnapshot bool Indicates if the configured Snapshot should be used. [optional] [default to false]

Return type

GetAcademicWeeksPartitions200Response

Authorization

oauth2_client_credentials

HTTP request headers

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

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

keyChangesSurveyQuestions

List keyChangesSurveyQuestions(offset, limit, minChangeVersion, maxChangeVersion, totalCount, useSnapshot)

Retrieves resources key changes based on change version.

This operation is used to retrieve identifying information about resources whose key values have been changed.

Example

import 'package:edfi_resources_sdk/api.dart';
// TODO Configure OAuth2 access token for authorization: oauth2_client_credentials
//defaultApiClient.getAuthentication<OAuth>('oauth2_client_credentials').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = SurveyQuestionsApi();
final offset = 56; // int | Indicates how many items should be skipped before returning results.
final limit = 56; // int | Indicates the maximum number of items that should be returned in the results.
final minChangeVersion = 789; // int | Used in synchronization to set sequence minimum ChangeVersion
final maxChangeVersion = 789; // int | Used in synchronization to set sequence maximum ChangeVersion
final totalCount = true; // bool | Indicates if the total number of items available should be returned in the 'Total-Count' header of the response.  If set to false, 'Total-Count' header will not be provided. Must be false when using cursor paging (with pageToken).
final useSnapshot = true; // bool | Indicates if the configured Snapshot should be used.

try {
    final result = api_instance.keyChangesSurveyQuestions(offset, limit, minChangeVersion, maxChangeVersion, totalCount, useSnapshot);
    print(result);
} catch (e) {
    print('Exception when calling SurveyQuestionsApi->keyChangesSurveyQuestions: $e\n');
}

Parameters

Name Type Description Notes
offset int Indicates how many items should be skipped before returning results. [optional]
limit int Indicates the maximum number of items that should be returned in the results. [optional] [default to 25]
minChangeVersion int Used in synchronization to set sequence minimum ChangeVersion [optional]
maxChangeVersion int Used in synchronization to set sequence maximum ChangeVersion [optional]
totalCount bool Indicates if the total number of items available should be returned in the 'Total-Count' header of the response. If set to false, 'Total-Count' header will not be provided. Must be false when using cursor paging (with pageToken). [optional] [default to false]
useSnapshot bool Indicates if the configured Snapshot should be used. [optional] [default to false]

Return type

List

Authorization

oauth2_client_credentials

HTTP request headers

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

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

postSurveyQuestion

postSurveyQuestion(edFiSurveyQuestion)

Creates or updates resources based on the natural key values of the supplied resource.

The POST operation can be used to create or update resources. In database terms, this is often referred to as an "upsert" operation (insert + update). Clients should NOT include the resource "id" in the JSON body because it will result in an error. The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately. It is recommended to use POST for both create and update except while updating natural key of a resource in which case PUT operation must be used.

Example

import 'package:edfi_resources_sdk/api.dart';
// TODO Configure OAuth2 access token for authorization: oauth2_client_credentials
//defaultApiClient.getAuthentication<OAuth>('oauth2_client_credentials').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = SurveyQuestionsApi();
final edFiSurveyQuestion = EdFiSurveyQuestion(); // EdFiSurveyQuestion | The JSON representation of the \"surveyQuestion\" resource to be created or updated.

try {
    api_instance.postSurveyQuestion(edFiSurveyQuestion);
} catch (e) {
    print('Exception when calling SurveyQuestionsApi->postSurveyQuestion: $e\n');
}

Parameters

Name Type Description Notes
edFiSurveyQuestion EdFiSurveyQuestion The JSON representation of the "surveyQuestion" resource to be created or updated.

Return type

void (empty response body)

Authorization

oauth2_client_credentials

HTTP request headers

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

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

putSurveyQuestion

putSurveyQuestion(id, edFiSurveyQuestion, ifMatch)

Updates a resource based on the resource identifier.

The PUT operation is used to update a resource by identifier. If the resource identifier ("id") is provided in the JSON body, it will be ignored. Additionally, this API resource is not configured for cascading natural key updates. Natural key values for this resource cannot be changed using PUT operation, so the recommendation is to use POST as that supports upsert behavior.

Example

import 'package:edfi_resources_sdk/api.dart';
// TODO Configure OAuth2 access token for authorization: oauth2_client_credentials
//defaultApiClient.getAuthentication<OAuth>('oauth2_client_credentials').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = SurveyQuestionsApi();
final id = id_example; // String | A resource identifier that uniquely identifies the resource.
final edFiSurveyQuestion = EdFiSurveyQuestion(); // EdFiSurveyQuestion | The JSON representation of the \"surveyQuestion\" resource to be created or updated.
final ifMatch = ifMatch_example; // String | The ETag header value used to prevent the PUT from updating a resource modified by another consumer.

try {
    api_instance.putSurveyQuestion(id, edFiSurveyQuestion, ifMatch);
} catch (e) {
    print('Exception when calling SurveyQuestionsApi->putSurveyQuestion: $e\n');
}

Parameters

Name Type Description Notes
id String A resource identifier that uniquely identifies the resource.
edFiSurveyQuestion EdFiSurveyQuestion The JSON representation of the "surveyQuestion" resource to be created or updated.
ifMatch String The ETag header value used to prevent the PUT from updating a resource modified by another consumer. [optional]

Return type

void (empty response body)

Authorization

oauth2_client_credentials

HTTP request headers

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

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