انتقل إلى المحتوى الرئيسي

API Versioning

API versioning strategy, deprecation policies, and migration guidance.

Current Version

The Ever Gauzy API is currently unversioned — all endpoints are served at /api/.

https://api.yourdomain.com/api/employee

Versioning Strategy

When breaking changes are introduced, the API will adopt URI-based versioning:

https://api.yourdomain.com/api/v1/employee
https://api.yourdomain.com/api/v2/employee

NestJS Versioning Support

app.enableVersioning({
type: VersioningType.URI,
defaultVersion: "1",
});

Per-Controller Versioning

@Controller({ path: "employee", version: "2" })
export class EmployeeV2Controller {
// v2 endpoints
}

Per-Endpoint Versioning

@Get()
@Version('1')
findAllV1() { ... }

@Get()
@Version('2')
findAllV2() { ... }

Deprecation Policy

PhaseDurationAction
AnnouncementRelease notes, docs update
Deprecated6 monthsSunset header added, warnings logged
RemovedEndpoint returns 410 Gone

Deprecation Headers

Sunset: Sat, 01 Jun 2025 00:00:00 GMT
Deprecation: true
Link: <https://docs.gauzy.co/migration>; rel="successor-version"

GraphQL Versioning

GraphQL APIs evolve through field-level deprecation:

type Employee {
name: String @deprecated(reason: "Use firstName and lastName")
firstName: String
lastName: String
}