# List Upcoming Events GET /api/v1/community/events/upcoming/ **GET:** List all upcoming platform events for the community. Events are ordered by start date (most recent upcoming first). Supports filtering by event type and search functionality. Reference: https://docs.aisquare.studio/api-reference/ai-square-studio-api/community/events-upcoming-list ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: AISquare Studio API version: 1.0.0 paths: /api/v1/community/events/upcoming/: get: operationId: events-upcoming-list summary: List Upcoming Events description: >- **GET:** List all upcoming platform events for the community. Events are ordered by start date (most recent upcoming first). Supports filtering by event type and search functionality. tags: - subpackage_community parameters: - name: event_type in: query description: Filter by event type required: false schema: $ref: >- #/components/schemas/ApiV1CommunityEventsUpcomingGetParametersEventType - name: ordering in: query description: Which field to use when ordering the results. required: false schema: type: string - name: page in: query description: A page number within the paginated result set. required: false schema: type: integer - name: page_size in: query description: Number of results to return per page. required: false schema: type: integer - name: search in: query description: Free text search across event name and description required: false schema: type: string responses: '200': description: List of upcoming events content: application/json: schema: $ref: '#/components/schemas/PaginatedCommunityEventList' components: schemas: ApiV1CommunityEventsUpcomingGetParametersEventType: type: string enum: - challenge - contest - masterclass - panel - summit - workshop title: ApiV1CommunityEventsUpcomingGetParametersEventType EventTypeEnum: type: string enum: - contest - challenge - workshop - masterclass - panel - summit description: |- * `contest` - Contest * `challenge` - Challenge * `workshop` - Workshop * `masterclass` - Masterclass * `panel` - Panel * `summit` - Summit title: EventTypeEnum CommunityEvent: type: object properties: id: type: integer uid: type: string format: uuid event_name: type: string event_description: type: - string - 'null' event_type: $ref: '#/components/schemas/EventTypeEnum' event_start_date: type: string format: date-time event_end_date: type: string format: date-time event_logo: type: - string - 'null' format: uri event_banner: type: - string - 'null' format: uri event_website: type: - string - 'null' format: uri event_prize: type: - string - 'null' created_at: type: string format: date-time updated_at: type: string format: date-time required: - id - uid - event_name - event_description - event_type - event_start_date - event_end_date - event_logo - event_banner - event_website - event_prize - created_at - updated_at description: |- Serializer for upcoming events in the community. Shows event details optimized for community explore/listing pages. title: CommunityEvent PaginatedCommunityEventList: type: object properties: count: type: integer next: type: - string - 'null' format: uri previous: type: - string - 'null' format: uri results: type: array items: $ref: '#/components/schemas/CommunityEvent' required: - count - results title: PaginatedCommunityEventList ``` ## SDK Code Examples ```python Get all upcoming events import requests url = "https://api.example.com/api/v1/community/events/upcoming/" payload = {} headers = {"Content-Type": "application/json"} response = requests.get(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Get all upcoming events const url = 'https://api.example.com/api/v1/community/events/upcoming/'; const options = {method: 'GET', headers: {'Content-Type': 'application/json'}, body: '{}'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Get all upcoming events package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/community/events/upcoming/" payload := strings.NewReader("{}") req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Get all upcoming events require 'uri' require 'net/http' url = URI("https://api.example.com/api/v1/community/events/upcoming/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java Get all upcoming events import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.example.com/api/v1/community/events/upcoming/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Get all upcoming events request('GET', 'https://api.example.com/api/v1/community/events/upcoming/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Get all upcoming events using RestSharp; var client = new RestClient("https://api.example.com/api/v1/community/events/upcoming/"); var request = new RestRequest(Method.GET); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Get all upcoming events import Foundation let headers = ["Content-Type": "application/json"] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/api/v1/community/events/upcoming/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```