You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

?????? ?????? ??? ????????? ?????????? ? ?????/(?)???, ?????? ? ???????? ???????????? ??????.

URL-????? ???????

https://local.cipher.kiev.ua:9090/api/v1/certificateAuthority/supported

?????

GET

????????? ???????

???????????

????????????? ????????? ???????

???????????

?????
??? ??????Content-type?????????? ??????????????? ???????????
200application/jsonca
{
"ca": [
{
"name": "?????/???? ??? ?? \"??????????\"",
"id": "privat"
},
{
"name": "?????/???? ??? ???",
"id": "iddDfs"
},
{
"name": "???????? ??? ??????",
"id": "testIitCipher"
},
{
"name": "?????/???? ??? \"????? ???????????? ?????? \"???????\"",
"id": "tovUkraine"
},
{
"name": "???????? ??? ???",
"id": "testIitCa"
},
{
"name": "???????? ??? ?????? (??????)",
"id": "testIitCipherProxy"
}
]
}
503application/jsonmessage
{
    "message" : "?????? ???????? ?????? ?? ???????."
}
????????? JSON ??????? ??????
????????
??? ??????
????????
messageString???????? ?????????? ?????????? ????????
caArray?????? ?????????????? ???????? ?????/(?)???

???? ???????? ??????? ca

????
??? ??????
????????
nameString???????? ?????/(?)??? ?? ?????????? ?????. ???????? ?? ??????????????.
idString????????????? ?????/(?)???, ??????? ???????????? ??? ?????? ?? ?????? ?????/(?)??? ?????? ???????
?????? ???? ?? JavaScript + jQuery 2.2.4
$.ajax({
    url: "https://local.cipher.kiev.ua:9090/api/v1/certificateAuthority/supported",
    type: "GET",
    dataType: "json",
    cache: false
}).done(function (jsonResponse, textStatus, xhr) {
    ca = jsonResponse.ca;
}).fail(function (xhr) {
    try {
        var jsonResponse = JSON.parse(xhr.responseText);
        message = jsonResponse.message;
    } catch (e) {
        message = (xhr.responseText == undefined) ? "?????? ??? ????????? ?????? ?????????????? ?????/(?)???." : xhr.responseText;
    }
})



  • No labels