موقع حكومي رسمي تابع لحكومة المملكة العربية السعودية
كيف تتحقق
Skip Navigation Links 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

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

Headsers Table

#
​Head​​
​Value
Head Type
1​ ​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 requests
def 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."
}
}

Last modified date:19/09/2024 - 01:50 PM Saudi Arabia time

Was this page helpful?

Your feedback has been sent successfully!

0 % of users said yes out of 0 comments

Please tell us the reason * (you can select multiple options)




I am*