guides:ws_payloads
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
guides:ws_payloads [2019/09/23 15:11] – brett.zamora | guides:ws_payloads [2020/08/23 15:46] (current) – brett.zamora | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Web Service: Payloads | + | ==== payloads:get_repository_names |
+ | The payloads web service is a REST structured service that derives its functionality based on syntax used when calling the web service. In it's simplest form, with no parameters supplied, the payload service returns a list of supported repository names and a count of the number of payloads in each repository. | ||
- | The Payloads web service is a general purpose web service that derives its functionality based on syntax used when calling the web service. The following paragraphs outline the various functions and syntax supported by the Payloads web service. | + | ---- |
- | Function: Get supported repository names with payload counts. | + | **Purpose:** <color # |
Line 23: | Line 24: | ||
{{tablelayout? | {{tablelayout? | ||
^ Key ^ Value ^ | ^ Key ^ Value ^ | ||
- | | Content-Type | application/ | ||
| access_token | {soft-token} | | | access_token | {soft-token} | | ||
Line 29: | Line 29: | ||
<color # | <color # | ||
- | {{tablelayout? | + | N/A |
- | ^ Parm Name ^ Req/Opt ^ Format ^ Description ^ | + | |
- | | checksum_key | Required | [string] | The checksum key of a checksum record stored in the CeRTNA Portal. | | + | |
- | | checksum | Required | [string] | Locally calculated binary checksum value converted to a Base64 string. | | + | |
- | + | ||
- | <color # | + | |
- | + | ||
- | {{tablelayout? | + | |
- | ^ Parm Name ^ Format ^ Description ^ | + | |
- | | is_valid | [string] | True if checksum values match, otherwise false. | | + | |
- | | code | [string] | Exception conditions will result in code/ | + | |
- | | message | [string] | Longer description of exception condition. | | + | |
+ | **Notes:** | ||
- | As noted, any condition that results in an unsuccessful call to the ValidateChecksum | + | Any condition that results in an unsuccessful call to the payloads |
Line 50: | Line 40: | ||
**Endpoint: | **Endpoint: | ||
- | < | + | < |
- | **Headers: | + | <color # |
- | Content-Type: application/ | + | Status Code: 200 |
- | **Body:** | + | <code json> |
+ | [ | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | </ | ||
+ | |||
+ | |||
+ | **OR** | ||
+ | |||
+ | Status Code: 500 (When an error occurs.) | ||
<code json> | <code json> | ||
{ | { | ||
- | | + | |
- | "checksum" : "1/ | + | |
+ | "Message": "Invalid Session Id" | ||
+ | } | ||
} | } | ||
</ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | **FUNCTION: | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | {{tablelayout? | ||
+ | ^ Method ^ URL ^ | ||
+ | | GET | < | ||
+ | |||
+ | **Variables: | ||
+ | |||
+ | {{tablelayout? | ||
+ | ^ Variable ^ Usage ^ Description ^ | ||
+ | | {repository} | Required | The name of the repository | | ||
+ | |||
+ | |||
+ | **Arguments: | ||
+ | |||
+ | {{tablelayout? | ||
+ | ^ Variable ^ Usage ^ Description ^ | ||
+ | | {filter} | Optional | Collection of {column_name}: | ||
+ | | {page_size} | Optional | A positive integer representing the number of items returned for a single page of results. | ||
+ | | {page} | Optional | A positive integer representing the page index of the result set. First index is 0. | | ||
+ | | {order} | Optional | Sort order of the returned data. Format {column_name}: | ||
+ | |||
+ | |||
+ | **Filter Usage:** | ||
+ | |||
+ | |||
+ | {{tablelayout? | ||
+ | ^ Column Name ^ Comparators ^ Allowed Values ^ | ||
+ | | FILE_NAME | Equals, Contains, StartsWith, EndsWith | Any string data. | | ||
+ | | LOCK_STATUS | Equals | Locked, Unlocked, All | | ||
+ | | DATE_CREATED | Equals, Greater, GreaterEqual, | ||
+ | | DATE_MODIFIED | Equals, Greater, GreaterEqual, | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | N/A | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | {{tablelayout? | ||
+ | ^ Key ^ Value ^ | ||
+ | | access_token | {soft-token} | | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | N/A | ||
+ | |||
+ | **Notes:** | ||
+ | |||
+ | Any condition that results in an unsuccessful call to the payloads web service will produce a JSON formatted response with a code and message property populated. | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | **Endpoint: | ||
+ | |||
+ | < | ||
Line 75: | Line 159: | ||
<code json> | <code json> | ||
{ | { | ||
- | "is_valid": "true" | + | "result": |
+ | { | ||
+ | | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
} | } | ||
</ | </ | ||
Line 84: | Line 199: | ||
Status Code: 500 (When an error occurs.) | Status Code: 500 (When an error occurs.) | ||
+ | <code json> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
- | (example | + | **FUNCTION: |
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | {{tablelayout? | ||
+ | ^ Method ^ URL ^ | ||
+ | | GET | < | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | N/A | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | {{tablelayout? | ||
+ | ^ Key ^ Value ^ | ||
+ | | access_token | {soft-token} | | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | N/A | ||
+ | |||
+ | **Notes: | ||
+ | |||
+ | Any condition that results in an unsuccessful call to the payloads web service will produce a JSON formatted response with a code and message property populated. | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | **Endpoint: | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | <color # | ||
+ | |||
+ | Status Code: 200 | ||
+ | |||
+ | <code json> | ||
+ | [ | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | </ | ||
+ | |||
+ | |||
+ | **OR** | ||
+ | |||
+ | Status Code: 500 (When an error occurs.) | ||
<code json> | <code json> | ||
{ | { | ||
" | " | ||
- | " | + | " |
- | " | + | " |
} | } | ||
} | } | ||
</ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
guides/ws_payloads.1569251485.txt.gz · Last modified: by brett.zamora