-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathapi.http
57 lines (47 loc) · 1.54 KB
/
api.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@hostname = test.square.ukp-lab.de
### GET TOKEN
# @name get_token
# @prompt username
# @prompt password
POST https://{{hostname}}/auth/realms/square/protocol/openid-connect/token HTTP/1.1
Host: {{hostname}}
content-type: application/x-www-form-urlencoded
client_id=square-api&grant_type=password&username={{username}}&password={{password}}
###
# @name get_deployed_models
@token = {{get_token.response.body.access_token}}
GET https://{{hostname}}/api/models/deployed-models HTTP/1.1
Host: {{hostname}}
Authorization: Bearer {{token}}
###
# @name remove_model
@token = {{get_token.response.body.access_token}}
@prompt model_name
DELETE https://{{hostname}}/api/models/remove/{{model_name}} HTTP/1.1
Host: {{hostname}}
Authorization: Bearer {{token}}
###
# @name deploy_all_models
@token = {{get_token.response.body.access_token}}
POST https://{{hostname}}/api/models/db/deploy HTTP/1.1
Host: {{hostname}}
Authorization: Bearer {{token}}
###
# @name get_datastores
@token = {{get_token.response.body.access_token}}
GET https://{{hostname}}/api/datastores HTTP/1.1
Host: {{hostname}}
Authorization: Bearer {{token}}
###
# @name get_datastores_indices
@token = {{get_token.response.body.access_token}}
GET https://{{hostname}}/api/datastores/nq/indices HTTP/1.1
Host: {{hostname}}
Authorization: Bearer {{token}}
###
# @name deploy_model
@token = {{get_token.response.body.access_token}}
# @prompt model_identifier {model_identifier}
POST https://{{hostname}}/api/models/db/deploy/{{model_identifier}} HTTP/1.1
Host: {{hostname}}
Authorization: Bearer {{token}}