Common API Errors - Chronic Absenteeism-VDG

HTTP CodeError MessageStrategies for fixing
400Validation of 'RESOURCE' failed. FIELD is required.

An element of the JSON that is required is missing and needs to be added.

You can check the API Swagger docs (https://api.ed-fi.org/v5.2/docs/swagger/index.html?urls.primaryName=Resources) to see required elements. Open the resource POST section, then click on the Model tab under the JSON representation. Required elements are labeled with an * beside them.

400 'RESOURCE' failed. RESOURCE reference could not be resolved.

A resource that was referenced from an entity does not yet exist: load the dependency resource first. 

See the section of this guide on "Dependency Ordering for Resources".

403Authorization denied. The claim does not have any established relationships with the requested resource.

These are the most likely causes:

  1. Your API credentials are not associated with the proper EducationOrganization or Namespace. See information under the section of this guide on "Authorization"
  2. The API cannot tie the resource you are creating or updating to a "root" entity for which you are authorized. For example, you may be trying to update a Student, but if that student is not enrolled (via StudentSchoolAssociation) the request will fail, as the API cannot determine that your client is authorized. See information under the section of this guide on "Authorization"
  3. When the record is person-based (e.g., Attendance, Grades, Section Associations), it usually means the Student, Staff, or Parent record is not in the ODS so the records being sent for that person cannot be created.
409A natural key conflict occurred when attempting to create a new resource 'RESOURCE' with a duplicate key.

The Ed-Fi API has a natural key system alongside a standard REST ID system. This error is often protecting against the erroneous creation of a duplicate record in the API. However, it may also indicate that the natural key requirements of the Ed-Fi API have not been satisfied, and the key needs to be modified.

See the section in this guide on "API Resource Keys"

409The resource (or a subordinate entity of the resource) cannot be deleted because it is a dependency of the 'RESOURCE' entityThe resource that the application is attempting to delete is referenced from another entity. Delete the other dependent entity first.