Token API V1
ChaingunToken1API WSDL letöltése
Create token
Token létrehozása.
Web service API
Kérés
| Név | Típus | Leírás |
|---|---|---|
| requestMeta | RequestMeta_V1 | A kérés metaadatai. |
| tokenType | String | A Token típusa. |
| content | String | Az tartalom amit a Token azonosít. |
Válasz
| Név | Típus | Leírás |
|---|---|---|
| status | ResponseStatus_V1 | A válasz státusza. |
| params | Param_V1 [ ] | Egyéb paraméterek listája. |
| token | String | A létrehozott token. |
Minta
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://chaingun.dbx.hu/api/token/v1">
<soapenv:Header/>
<soapenv:Body>
<v1:create>
<request>
<requestMeta>
<clientHashKey>{hashkey}</clientHashKey>
<userName>admin</userName>
</requestMeta>
<tokenType>urlParam</tokenType>
<content>objectRefs%5B%5D=1&objectRefs%5B%5D=2</content>
</request>
</v1:create>
</soapenv:Body>
</soapenv:Envelope>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<ns2:createResponse xmlns:ns2="http://chaingun.dbx.hu/api/token/v1">
<response>
<status>
<code>0</code>
<messages/>
</status>
<params/>
<token>b07be6b6f37a4d31be790ee13ae7439a</token>
</response>
</ns2:createResponse>
</S:Body>
</S:Envelope>
REST API
Kérés
POST hammy/json/token/v1/tokens
| Név | Típus | Leírás |
|---|---|---|
| tokenType | String | A Token típusa. |
| content | String | Az érték amit a Token azonosít. |
Válasz
| Név | Típus | Leírás |
|---|---|---|
| meta | JListMeta1 | A válaszhoz tartozó metaadatok. |
| token | String | A létrehozott token. |
Minta
POST /hammy/json/token/v1/tokens
Content-Type: application/json
{
"tokenType": "urlParam",
"content": "objectRefs%5B%5D=1&objectRefs%5B%5D=2"
}
{
"data": {
"type": "createTokenResponse",
"id": "80887e36-7c6c-43c6-84c8-220385d34de3",
"attributes": {
"token": "c30f904638a5448eac8b29815e3bb25e"
}
},
"meta": {
"params": [],
"responseStatus": {
"code": 0,
"messages": []
}
}
}
Show token
Token adatainak lekérése.
Web service API
Kérés
| Név | Típus | Leírás |
|---|---|---|
| requestMeta | RequestMeta_V1 | A kérés metaadatai. |
| token | String | A Token. |
Válasz
| Név | Típus | Leírás |
|---|---|---|
| status | ResponseStatus_V1 | A válasz státusza. |
| params | Param_V1 [ ] | Egyéb paraméterek listája. |
| token | WToken1 | A keresett token. |
Minta
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://chaingun.dbx.hu/api/token/v1">
<soapenv:Header/>
<soapenv:Body>
<v1:show>
<request>
<requestMeta>
<clientHashKey>{hashkey}</clientHashKey>
<userName>admin</userName>
</requestMeta>
<token>b07be6b6f37a4d31be790ee13ae7439a</token>
</request>
</v1:show>
</soapenv:Body>
</soapenv:Envelope>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<ns2:showResponse xmlns:ns2="http://chaingun.dbx.hu/api/token/v1">
<response>
<status>
<code>0</code>
<messages/>
</status>
<params/>
<token>
<createdAt>2024-01-12T15:06:59.930Z</createdAt>
<uuid>5e741fac-f106-46c3-a92c-f40a26d13250</uuid>
<token>b07be6b6f37a4d31be790ee13ae7439a</token>
<tokenType>url</tokenType>
<content>test</content>
<lastUsedAt>2024-01-12T15:08:19.006Z</lastUsedAt>
</token>
</response>
</ns2:showResponse>
</S:Body>
</S:Envelope>
REST API
Kérés
GET hammy/json/token/v1/tokens/{{token}}
path
| Név | Típus | Leírás |
|---|---|---|
| token | String | A Token. |
Válasz
| Típus | Leírás |
|---|---|
| JToken1 | A keresett token. |
Minta
GET /hammy/json/token/v1/tokens/{token}
Content-Type: application/json
Query params:
------------
token={{A lekérdezendő token}}
HTTP/1.1 200 OK
Authorization: JWT {{jwtToken}}
Content-Type: application/vnd.api+json
{
"data": {
"type": "tokens",
"id": "524a3b7d-65cc-4feb-be69-f89a4b7b54b0",
"attributes": {
"token": "0b040985d478433e942422e0a0c5220b",
"tokenType": "url",
"content": "teszt",
"createdAt": "2024-01-11T14:56:03.698+00:00",
"lastUsedAt": "2024-01-12T11:07:33.780+00:00"
}
},
"meta": {
"params": [],
"responseStatus": {
"code": 0,
"messages": []
}
}
}
Delete token
Token törlése
Web service API
Kérés
| Név | Típus | Leírás |
|---|---|---|
| requestMeta | RequestMeta_V1 | A kérés metaadatai. |
| token | String | A törlendő token. |
Válasz
| Név | Típus | Leírás |
|---|---|---|
| response | WDeleteTokenResult1 | A törlés eredménye |
Minta
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://chaingun.dbx.hu/api/token/v1">
<soapenv:Header/>
<soapenv:Body>
<v1:delete>
<request>
<requestMeta>
<clientHashKey>{hashkey}</clientHashKey>
<userName>admin</userName>
</requestMeta>
<token>b07be6b6f37a4d31be790ee13ae7439a</token>
</request>
</v1:delete>
</soapenv:Body>
</soapenv:Envelope>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<ns2:deleteResponse xmlns:ns2="http://chaingun.dbx.hu/api/token/v1">
<response>
<status>
<code>0</code>
<messages/>
</status>
<params/>
</response>
</ns2:deleteResponse>
</S:Body>
</S:Envelope>
REST API
Kérés
DELETE hammy/json/token/v1/tokens
| Név | Típus | Leírás |
|---|---|---|
| token | String | A törlendő token |
Válasz
| Típus | Leírás |
|---|---|
| JDeleteTokenResult1 | A törlés eredménye |
Minta
DELETE /hammy/json/token/v1/tokens/:token
Content-Type: application/json
Path params:
------------
token={{A törlendő token}}
HTTP/1.1 200 OK
Authorization: JWT {{jwtToken}}
Content-Type: application/vnd.api+json
Find tokens
Token-ek listázása.
Web service API
Kérés
| Név | Típus | Leírás |
|---|---|---|
| requestMeta | RequestMeta_V1 | A kérés metaadatai. |
| token | String | Szűrés token alapján. |
| tokenType | String | Szűrés típus alapján. |
| createdAtFrom | Date | Létrehozás dátuma intervallum alsó határa. |
| createdAtTo | Date | Létrehozás dátuma intervallum felső határa. |
| lastUsedAtFrom | Date | Utolsó használat dátuma intervallum felső határa. |
| lastUsedAtTo | Date | Utolsó használat dátuma intervallum felső határa. |
Válasz
| Név | Típus | Leírás |
|---|---|---|
| status | ResponseStatus_V1 | A válasz státusza. |
| params | Param_V1 [ ] | Egyéb paraméterek listája. |
| tokens | WToken1 [ ] | A keresett tokenek listája. |
Minta
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://chaingun.dbx.hu/api/token/v1">
<soapenv:Header/>
<soapenv:Body>
<v1:find>
<request>
<requestMeta>
<clientHashKey>ab364bccd7572hdd2</clientHashKey>
<userName>admin</userName>
</requestMeta>
<limit>?</limit>
<offset>?</offset>
<token>?</token>
<tokenType>?</tokenType>
<createdAtFrom>?</createdAtFrom>
<createdAtTo>?</createdAtTo>
<lastUsedAtFrom>?</lastUsedAtFrom>
<lastUsedAtTo>?</lastUsedAtTo>
</request>
</v1:find>
</soapenv:Body>
</soapenv:Envelope>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<ns2:findResponse xmlns:ns2="http://chaingun.dbx.hu/api/token/v1">
<response>
<status>
<code>0</code>
<messages/>
</status>
<params/>
<total>6</total>
<tokens>
<tokens>
<createdAt>2024-01-11T14:56:03.698Z</createdAt>
<uuid>524a3b7d-65cc-4feb-be69-f89a4b7b54b0</uuid>
<token>0b040985d478433e942422e0a0c5220b</token>
<tokenType>url</tokenType>
<content>teszt</content>
<lastUsedAt>2024-01-12T11:07:33.780Z</lastUsedAt>
</tokens>
<tokens>
<createdAt>2024-01-11T14:56:02.011Z</createdAt>
<uuid>d809966e-0450-4ad3-8f64-0b6f84ada3b0</uuid>
<token>e9761595f62943b7b851173147448d6b</token>
<tokenType>url</tokenType>
<content>teszt</content>
</tokens>
<tokens>
<createdAt>2024-01-11T14:56:02.849Z</createdAt>
<uuid>a70263e7-0d06-4aab-8319-4ce1e734fafb</uuid>
<token>5cdeaac59ffc4505a442fa1f45b3ed76</token>
<tokenType>url</tokenType>
<content>teszt</content>
</tokens>
<tokens>
<createdAt>2024-01-12T15:11:10.361Z</createdAt>
<uuid>8286460e-a6c6-4190-87d9-1a4971746e84</uuid>
<token>cc26f11ff2d142e4bee140c604e2760a</token>
<tokenType>url</tokenType>
<content>test</content>
</tokens>
<tokens>
<createdAt>2024-01-12T15:11:08.615Z</createdAt>
<uuid>efe1140b-2d66-426c-8fc7-3dd32981f475</uuid>
<token>bf49c906c98b43a39f48f6b058d94821</token>
<tokenType>url</tokenType>
<content>test</content>
</tokens>
<tokens>
<createdAt>2024-01-12T15:11:09.644Z</createdAt>
<uuid>8842ae3f-cdb4-4e52-85ad-c333951d7d6e</uuid>
<token>c3ac56a882cf4f1083fabc71ccd36ddd</token>
<tokenType>url</tokenType>
<content>test</content>
</tokens>
</tokens>
</response>
</ns2:findResponse>
</S:Body>
</S:Envelope>
REST API
Kérés
GET hammy/json/token/v1/tokens
pathparam
| Paraméter | Típus | Leírás |
|---|---|---|
| token | String | Szűrés token alapján. |
| tokenType | String | Szűrés típus alapján. |
| createdAtFrom | Date | Létrehozás dátuma intervallum alsó határa. |
| createdAtTo | Date | Létrehozás dátuma intervallum felső határa. |
| lastUsedAtFrom | Date | Utolsó használat dátuma intervallum felső határa. |
| lastUsedAtTo | Date | Utolsó használat dátuma intervallum felső határa. |
Válasz
| Típus | Leírás |
|---|---|
| JToken1 [] | A keresett tokenek listája. |
Minta
GET /hammy/json/token/v1/tokens
Content-Type: application/json
HTTP/1.1 200 OK
Authorization: JWT {{jwtToken}}
Content-Type: application/vnd.api+json
{
"data": [
{
"type": "tokens",
"id": "524a3b7d-65cc-4feb-be69-f89a4b7b54b0",
"attributes": {
"token": "0b040985d478433e942422e0a0c5220b",
"tokenType": "url",
"content": "teszt",
"createdAt": "2024-01-11T14:56:03.698+00:00",
"lastUsedAt": "2024-01-12T11:07:33.780+00:00"
}
},
{
"type": "tokens",
"id": "d809966e-0450-4ad3-8f64-0b6f84ada3b0",
"attributes": {
"token": "e9761595f62943b7b851173147448d6b",
"tokenType": "url",
"content": "teszt",
"createdAt": "2024-01-11T14:56:02.011+00:00"
}
},
{
"type": "tokens",
"id": "a70263e7-0d06-4aab-8319-4ce1e734fafb",
"attributes": {
"token": "5cdeaac59ffc4505a442fa1f45b3ed76",
"tokenType": "url",
"content": "teszt",
"createdAt": "2024-01-11T14:56:02.849+00:00"
}
}
],
"meta": {
"total": 3,
"params": [],
"responseStatus": {
"code": 0,
"messages": []
}
}
}