Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sd-doc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Skripnikov
sd-doc
Commits
f3af22b8
Commit
f3af22b8
authored
Dec 12, 2017
by
Valentin Skripnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-
parent
2416d912
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
docs/integration.rst
docs/integration.rst
+20
-19
No files found.
docs/integration.rst
View file @
f3af22b8
...
@@ -386,26 +386,30 @@ REST API ARTA Synergy доступно только авторизованным
...
@@ -386,26 +386,30 @@ REST API ARTA Synergy доступно только авторизованным
Пример
кода
на
JAVA
:
Пример
кода
на
JAVA
:
..
code
-
block
::
java
..
code
-
block
::
java
:
emphasize
-
lines
:
2
:
emphasize
-
lines
:
5
HttpResponse
<
String
>
response
=
Unirest
.
post
(
"https://demo.arta.kz/Synergy/rest/api/report/do?reportID=daa64ab2-1a79-4ea2-9c24-372e35d9da3e&fileName=report.pdf"
)
String
login
=
"Administrator"
;
.
header
(
"authorization"
,
"Basic QWRtaW5pc3RyYXRvcjoxMjM0NTY="
)
String
password
=
"123456"
;
.
header
(
"cache-control"
,
"no-cache"
)
HttpResponse
<
String
>
response
=
Unirest
.
get
(
"http://demo.arta.kz/Synergy/rest/api/admin/db/current_version"
)
.
header
(
"authorization"
,
Base64
.
getEncoder
().
encodeToString
((
login
+
":"
+
password
).
getBytes
(
"UTF-8"
)))
.
asString
();
.
asString
();
Пример
кода
на
JavaScript
(
jQuery
):
Пример
кода
на
JavaScript
(
jQuery
):
..
code
-
block
::
js
..
code
-
block
::
js
:
emphasize
-
lines
:
7
:
emphasize
-
lines
:
10
var
login
=
"Administrator"
;
var
password
=
"123456"
;
var
settings
=
{
var
settings
=
{
"async"
:
true
,
"async"
:
true
,
"crossDomain"
:
true
,
"crossDomain"
:
true
,
"url"
:
"http
s://demo.arta.kz/Synergy/rest/api/report/do?reportID=daa64ab2-1a79-4ea2-9c24-372e35d9da3e&fileName=report.pdf
"
,
"url"
:
"http
://demo.arta.kz/Synergy/rest/api/admin/db/current_version
"
,
"method"
:
"
POS
T"
,
"method"
:
"
GE
T"
,
"headers"
:
{
"headers"
:
{
"authorization"
:
"Basic QWRtaW5pc3RyYXRvcjoxMjM0NTY="
,
"authorization"
:
(
"Basic "
+
btoa
(
login
+
":"
+
password
))
"cache-control"
:
"no-cache"
}
}
}
}
...
@@ -416,22 +420,19 @@ REST API ARTA Synergy доступно только авторизованным
...
@@ -416,22 +420,19 @@ REST API ARTA Synergy доступно только авторизованным
Пример
кода
на
PHP
:
Пример
кода
на
PHP
:
..
code
-
block
::
php
..
code
-
block
::
php
:
emphasize
-
lines
:
14
:
emphasize
-
lines
:
8
<?
php
<?
php
$
request
=
new
HttpRequest
();
$
login
=
"Administrator"
;
$
request
->
setUrl
(
'https://demo.arta.kz/Synergy/rest/api/report/do'
);
$
password
=
"123456"
$
request
->
setMethod
(
HTTP_METH_POST
);
$
request
->
setQueryData
(
array
(
$
request
=
new
HttpRequest
();
'reportID'
=>
'daa64ab2-1a79-4ea2-9c24-372e35d9da3e'
,
$
request
->
setUrl
(
'http://demo.arta.kz/Synergy/rest/api/admin/db/current_version'
);
'fileName'
=>
'report.pdf'
$
request
->
setMethod
(
HTTP_METH_GET
);
));
$
request
->
setHeaders
(
array
(
$
request
->
setHeaders
(
array
(
'cache-control'
=>
'no-cache'
,
'authorization'
=>
"Basic "
.
base64_encode
(
"$login:$password"
)
'authorization'
=>
'Basic QWRtaW5pc3RyYXRvcjoxMjM0NTY='
));
));
try
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment