Site Tools


guides:ws_payloads

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
guides:ws_payloads [2019/09/23 14:45] – created brett.zamoraguides: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. 
 + 
 +---- 
 + 
 +**Purpose:** <color #22b14c>**Get Supported Repository Names With Payload Counts.**</color> 
 + 
 + 
 +<color #7092be>Request Endpoint</color> 
 + 
 +{{tablelayout?colwidth="75px,575px"&rowsFixed=1&rowsVisible=10&float=center}} 
 +^ Method ^ URL ^ 
 +| GET | <nowiki>https://apex-prd.certna.org/APEX/Service/APEXPublicServer.svc/payloads</nowiki>
 + 
 + 
 +<color #7092be>Request Body</color> 
 + 
 +N/A 
 + 
 + 
 +<color #7092be>Request Headers</color> 
 + 
 +{{tablelayout?colwidth="150px,450px"&rowsFixed=1&rowsVisible=10&float=center}} 
 +^ Key ^ Value ^ 
 +| access_token | {soft-token} | 
 + 
 + 
 +<color #7092be>JSON Request Parameters</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 #7092be>Sample Request</color> 
 + 
 +**Endpoint:** 
 + 
 +<nowiki>https://apex-prd.certna.org/APEX/Service/APEXPublicServer.svc/payloads</nowiki> 
 + 
 + 
 +<color #7092be>Sample Response</color> 
 + 
 +Status Code: 200 
 + 
 + 
 +<code json> 
 +
 +    { 
 +        "Count": 0, 
 +        "RepositoryName": "Responses" 
 +    }, 
 +    { 
 +        "Count": 0, 
 +        "RepositoryName": "Requests" 
 +    }, 
 +    { 
 +        "Count": 96, 
 +        "RepositoryName": "Processed" 
 +    }, 
 +    { 
 +        "Count": 0, 
 +        "RepositoryName": "Invalid" 
 +    } 
 +
 +</code> 
 + 
 + 
 +**OR** 
 + 
 +Status Code: 500  (When an error occurs.) 
 + 
 +<code json> 
 +
 +    "Exception":
 +        "Code": "InvalidUserCredentials", 
 +        "Message": "Invalid Session Id" 
 +    } 
 +
 +</code> 
 + 
 + 
 +---- 
 + 
 + 
 +**FUNCTION:** <color #22b14c>**Get Payload File Names For Selected Repository**</color> 
 + 
 + 
 +<color #7092be>Request Endpoint</color> 
 + 
 +{{tablelayout?colwidth="75px,575px"&rowsFixed=1&rowsVisible=10&float=center}} 
 +^ Method ^ URL ^ 
 +| GET | <nowiki>https://apex-prd.certna.org/APEX/Service/APEXPublicServer.svc/payloads/{repository}?{filter}&page_size={page_size}&page={page_index}&order={order}</nowiki>
 + 
 +**Variables:** 
 + 
 +{{tablelayout?colwidth="100px,75px,475px"&rowsFixed=1&rowsVisible=10&float=center}} 
 +^ Variable ^ Usage ^ Description ^ 
 +| {repository} | Required | The name of the repository | 
 + 
 + 
 +**Arguments:** 
 + 
 +{{tablelayout?colwidth="100px,75px,475px"&rowsFixed=1&rowsVisible=10&float=center}} 
 +^ Variable ^ Usage ^ Description ^ 
 +| {filter} | Optional | Collection of {column_name}:{comparator}:{value} separated by ';' symbol. | 
 +| {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}:{sort_type}. Valid {sort_type) Ascending or Descending 
 + 
 + 
 +**Filter Usage:** 
 + 
 + 
 +{{tablelayout?colwidth="150px,250px,250px"&rowsFixed=1&rowsVisible=10&float=center}} 
 +^ 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, Less, LessEqual | Any valid date in format MM-dd-yyyy | 
 +| DATE_MODIFIED | Equals, Greater, GreaterEqual, Less, LessEqual | Any valid date in format MM-dd-yyyy | 
 + 
 + 
 +<color #7092be>Request Body</color> 
 + 
 +N/A 
 + 
 + 
 +<color #7092be>Request Headers</color> 
 + 
 +{{tablelayout?colwidth="150px,450px"&rowsFixed=1&rowsVisible=10&float=center}} 
 +^ Key ^ Value ^ 
 +| access_token | {soft-token} | 
 + 
 + 
 +<color #7092be>JSON Request Parameters</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 #7092be>Sample Request</color> 
 + 
 +**Endpoint:** 
 + 
 +<nowiki>https://apex-prd.certna.org/APEX/Service/APEXPublicServer.svc/payloads/processed? filter=date_created:GreaterEqual:7-28-2019;date_created:Less:8-31-2019;date_modified:GreaterEqual:8-25-2019;date_modified:Less:9-28-2019;file_name:Contains:test1;lock_status:Equal:Unlocked&page_size=10&page=1&order=Descending</nowiki> 
 + 
 + 
 +<color #7092be>Sample Response</color> 
 + 
 +Status Code: 200 
 + 
 + 
 +<code json> 
 +
 +    "result":
 +        { 
 +            "created": "2019-09-03 16:56:04", 
 +            "file_name": "standard_user-033-190903161430419-00001.1.1_190903165601809", 
 +            "lock_status": "Unlocked", 
 +            "modified": "2019-09-03 16:56:18" 
 +        }, 
 +        { 
 +            "created": "2019-09-03 16:56:04", 
 +            "file_name": "standard_user-033-190903161430419-00002.1.1_190903165601809", 
 +            "lock_status": "Unlocked", 
 +            "modified": "2019-09-03 16:56:23" 
 +        }, 
 +        { 
 +            "created": "2019-09-03 16:56:04", 
 +            "file_name": "standard_user-033-190903161430419-00003.1.1_190903165601809", 
 +            "lock_status": "Unlocked", 
 +            "modified": "2019-09-03 16:56:24" 
 +        }, 
 +        { 
 +            "created": "2019-09-03 16:56:04", 
 +            "file_name": "standard_user-033-190903161430419-00004.1.1_190903165601809", 
 +            "lock_status": "Unlocked", 
 +            "modified": "2019-09-03 16:56:17" 
 +        }, 
 +        { 
 +            "created": "2019-09-03 16:58:54", 
 +            "file_name": "standard_user-033-190903161430419-00050.1.1_190903165852480", 
 +            "lock_status": "Unlocked", 
 +            "modified": "2019-09-03 16:59:08" 
 +        } 
 +    ] 
 +
 +</code> 
 + 
 + 
 +**OR** 
 + 
 +Status Code: 500  (When an error occurs.) 
 + 
 +<code json> 
 +
 +    "Exception":
 +        "Code": "Undefined", 
 +        "Message": "Invalid filter condition field name - \"lock_value\"" 
 +    } 
 +
 +</code> 
 + 
 +**FUNCTION:** <color #22b14c>**Retrieve A Payload From A Repository**</color> 
 + 
 + 
 +<color #7092be>Request Endpoint</color> 
 + 
 +{{tablelayout?colwidth="75px,575px"&rowsFixed=1&rowsVisible=10&float=center}} 
 +^ Method ^ URL ^ 
 +| GET | <nowiki>https://apex-prd.certna.org/APEX/Service/APEXPublicServer.svc/payloads</nowiki>
 + 
 + 
 +<color #7092be>Request Body</color> 
 + 
 +N/A 
 + 
 + 
 +<color #7092be>Request Headers</color> 
 + 
 +{{tablelayout?colwidth="150px,450px"&rowsFixed=1&rowsVisible=10&float=center}} 
 +^ Key ^ Value ^ 
 +| access_token | {soft-token} | 
 + 
 + 
 +<color #7092be>JSON Request Parameters</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 #7092be>Sample Request</color> 
 + 
 +**Endpoint:** 
 + 
 +<nowiki>https://apex-prd.certna.org/APEX/Service/APEXPublicServer.svc/payloads</nowiki> 
 + 
 + 
 +<color #7092be>Sample Response</color> 
 + 
 +Status Code: 200 
 + 
 + 
 +<code json> 
 +
 +    { 
 +        "Count": 0, 
 +        "RepositoryName": "Responses" 
 +    }, 
 +    { 
 +        "Count": 0, 
 +        "RepositoryName": "Requests" 
 +    }, 
 +    { 
 +        "Count": 96, 
 +        "RepositoryName": "Processed" 
 +    }, 
 +    { 
 +        "Count": 0, 
 +        "RepositoryName": "Invalid" 
 +    } 
 +
 +</code> 
 + 
 + 
 +**OR** 
 + 
 +Status Code: 500  (When an error occurs.) 
 + 
 +<code json> 
 +
 +    "Exception":
 +        "Code": "InvalidUserCredentials", 
 +        "Message": "Invalid Session Id" 
 +    } 
 +
 +</code> 
 + 
 + 
 +---- 
  
  
-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. 
  
  
guides/ws_payloads.1569249945.txt.gz · Last modified: by brett.zamora