Statistics on the services provided by the Department of Saudi Affairs Abroad for the year 2023 in the Kingdom’s embassies موقع وزارة الخارجية | المملكة العربية السعودية English Open Data Platform Statistics on the services provided by the Department of Saudi Affairs Abroad for the year 2023 in the Kingdom’s embassies Get dataset information V1.0 GET رابط الطلب Request Link https://opendata.mofa.gov.sa/opendataapi/SaudiCitizensAbroad Headsers Table # Head Value Head Type1 Accept application/json Accept أمثلة الإستخدام Examples PHP <?php$curl = curl_init();curl_setopt($curl, CURLOPT_URL, 'APIURL');curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');$headers = ["Accept: application/json"];curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);$response = curl_exec($curl);if (curl_errno($curl)) { echo 'Error:' . curl_error($curl);} else { echo $response;}curl_close($curl);?> PYTHON import requestsdef test_request(): headers = { "Accept": "application/json" } data = None response = requests.get('https://opendata.mofa.gov.sa/opendataapi/SaudiCitizensAbroad', headers=headers, data=data) print(response.text)test_request() JAVASCRIPT fetch('https://opendata.mofa.gov.sa/opendataapi/SaudiCitizensAbroad', { method: 'GET', headers: new Headers( { "Accept": "application/json" } )}).then(response =>response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error)); CURL curl -X GET 'https://opendata.mofa.gov.sa/opendataapi/SaudiCitizensAbroad' -H "Accept: application/json" الإستجابات المتوقعة Status Code 200 { "ServiceType": "String", "Total": "int"} 404 { "transactionId": "String", "error": { "code": "NOT_FOUND", "message": "The requested resource was not found." }} 429 { "transactionId": "String", "error": { "code": "TOO_MANY_REQUESTS", "message": "Please try again later." }} 500 { "transactionId": "String", "error": { "code": "INTERNAL_SERVER_ERROR", "message": "An error occurred, please try again later." }} 503 { "transactionId": "String", "error": { "code": "SERVICE_UNAVAILABLE", "message": "Service is unavailable, please try again later." }}