# Admin API
the current version is v1, the new version is v2
### GET v1/admin/events:
* Query: {
* cityId: string,
* name: string,
* categoryId: string,
* **eventCenterId: string,**
* tagId: string,
* minStartDate: Date,
* maxStartDate: Date,
* sort: string,
* order: string,
* pageSize: number,
* pageNumber: number,
* published: boolean,
* managed: boolean,
* includeFakeCities: boolean
}
* Response: {
results: EventEntity[],
total: number,
}
### GET v2/admin/events:
* Query: {
* name: string,
* categoryId: string,
* cityId: string,
* streetAddress: string,
* tagId: string,
* minStartDate: Date,
* maxStartDate: Date,
* sort: string,
* order: string,
* pageSize: number,
* pageNumber: number,
* published: boolean,
* managed: boolean,
* includeFakeCities: boolean,
}
* Response: {
results: EventsInfoEntity[],
total: number,
}
----------------------------------------------------
### POST v1/admin/events:
* Body: {
* name: string,
* instanceName: string,
* starts: Date,
* ends: Date,
* **eventCenterId: string,**
* **eventCenter: EventCenter,**
* categories: string[],
* tags: string[],
* managed: boolean,
}
* Response: {
id: string,
}
### POST v2/admin/events:
* Body: {
* name: string,
* instanceName: string,
* starts: Date,
* ends: Date,
* **cityId: string,**
* **streetAddress: string,**
* **lat: number,**
* **lon: number,**
* categories: string[],
* tags: string[],
* managed: boolean,
}
* Response: {
id: string,
}
----------------------------------------------------
### POST v1/admin/events/get-upload-url:
No changes it still the same
### POST v2/admin/events/get-upload-url:
No changes it still the same
----------------------------------------------------
### POST v1/admin/events/upload-event:
* Body: {
// The url contains data as events
url: string,
}
* Response: {
status: string,
}
### POST v2/admin/events/upload-event:
the changes in the file content only
* Body: {
// The url contains data as events_Info
url: string,
}
* Response: {
status: string,
}
----------------------------------------------------
### PUT v1/admin/events/:eventId:
* Body: {
* name: string,
* instanceName: string,
* starts: Date,
* ends: Date,
* **eventCenterId: string,**
* **eventCenter: EventCenter,**
* categories: string[],
* tags: string[],
* published: boolean,
* managed: boolean
}
* Response: void
### PUT v2/admin/events/:eventId:
* Body: {
* name: string,
* instanceName: string,
* starts: Date,
* ends: Date,
* **cityId: string,**
* **streetAddress: string,**
* **lat: number,**
* **lon: number,**
* categories: string[],
* tags: string[],
* published: boolean,
* managed: boolean,
}
* Response: void
----------------------------------------------------
### GET v1/admin/events/:eventId:
* Response: {
* results: EventEntity[],
* total: number,
}
### GET v2/admin/events/:eventId:
* Response: {
* results: EventsInfoEntity[],
* total: number,
}
----------------------------------------------------
### POST v2/admin/events/city-relations:
* Still the same
----------------------------------------------------
### POST v2/admin/events/event/:eventId/tag/:tagId:
* Response: void
----------------------------------------------------
# Internal API
### POST v2/internal/events/FindEventById:
* Body: {
* eventId: string
}
* Response: EventEntity
----------------------------------------------------
### POST v1/internal/events/GetEventBookingInfo:
* Body: {
eventId: string,
}
* Response: {
* eventName: string,
* cityId: string,
* **cityName: string,**
* cityHotelzonId: string,
* relatedHotelzonCityIds: string[],
* location: {
* lat: number,
* lon: number,
* },
* radiusInKm: number,
}
### POST v2/internal/events/GetEventBookingInfo:
**Q: Here in this api we need hotelzonId for relatedHotelzonCityIdsResult from city where we gona take the hotelzonId?**
* Body: {
eventId: string,
}
* Response: {
* eventName: string,
* cityId: string,
* cityHotelzonId: string,
* relatedHotelzonCityIds: string[],
* location: {
* lat: number,
* lon: number,
* },
* radiusInKm: number,
}
----------------------------------------------------
# Public API
### GET v1/events:
* Query: {
* name: string,
* categoryId: string,
* tagId: string,
* **eventCenterId: string,**
* minStartDate: Date,
* sort: string,
* order: string,
* pageSize: number,
* pageNumber: number,
* includeFakeCities: boolean,
}
* Response: {
* results: EventEntity[],
* total: number,
}
### GET v2/events:
* Query: {
* name: string,
* categoryId: string,
* **cityId: string,**
* **streetAddress: string,**
* tagId: string,
* minStartDate: Date,
* sort: string,
* order: string,
* pageSize: number,
* pageNumber: number,
* includeFakeCities: boolean,
}
* Response: {
* results: EventsInfoEntity[],
* total: number,
}
----------------------------------------------------
### GET v1/events:
* Query: {
* keyword: string,
}
* Response: {
* events: {
* id: string,
* name: string,
* }[]
* tags: {
* id: string,
* description: string,
* created: Date,
* lastUpdated: Date,
* }[]
* categories: {
* id: string,
* description: string,
* created: Date,
* lastUpdated: Date,
* }[]
* eventCenters: {
* id: string,
* locationType: string,
* name: string,
* streetAddress: string,
* cityId: string,
* city: string,
* lat: number,
* lon: number,
* }[]
* fakeCities: {
* id: string,
* name: string,
* instanceName: string,
* published: boolean,
* managed: boolean,
* publishedOn: Date,
* starts: Date,
* ends: Date,
* eventCenter: EventCenter,
* categories: Category[],
* tags: Tag[],
* }[]
}
----------------------------------------------------
### GET v2/events:
* Query: {
* keyword: string,
}
* Response: {
* events: {
* id: string,
* name: string,
* }[]
* tags: {
* id: string,
* description: string,
* created: Date,
* lastUpdated: Date,
* }[]
* categories: {
* id: string,
* description: string,
* created: Date,
* lastUpdated: Date,
* }[]
* fakeCities: {
* id: string,
* name: string,
* instanceName: string,
* published: boolean,
* managed: boolean,
* publishedOn: Date,
* starts: Date,
* ends: Date,
* cityName: string,
* streetAddress: string,
* lat: number,
* lon: number,
* categories: Category[],
* tags: Tag[],
* }[]
}
----------------------------------------------------
### GET v1/events/:id:
* Response: EventEntity
----------------------------------------------------
### GET v2/events/:id:
----------------------------------------------------
* Response: EventsInfoEntity
----------------------------------------------------
### DELETE v1/events/outdated-events:
* Response: {
* message: string,
}
----------------------------------------------------
### DELETE v2/events/outdated-events:
* Response: {
* message: string,
}