Code Signing Get Policy
The "code-signing-get-policy" API allows users to retrieve the code signing policy associated with their account. By making a GET request to this endpoint, users can access detailed information about the configured signing policy applied to the code signing process.
Before you begin
- Configure the signing policy with relevant details, ensuring mapping to the enrolled certificate (also identified as the signing key on the signing policy page).
Request Structure
| Endpoint: | /code-signing-get-policy |
| Type: | POST |
| Sample URL: | https://<IP/HostName/TenantName>:<GWPORT>/avxapi/code-signing-get-policy?gwsource=externalTo understand the elements of the sample URL, click here. |
| Headers: | |
| Content-Type: | application/json |
| Name | Description |
|---|---|
| sessionId
|
(Mandatory) After successfully logging in, a unique
identifier assigned to a user's session after successful
authentication. The session ID remains valid until it expires.
The session ID is a string value. Example: "ce7f1a14-2bf9-4e4a-89a8-bc780a255813" |
| username
|
(Mandatory) AppViewX login username, represented as a string
value. Example: "User" |
| password
|
(Mandatory) AppViewX login username, represented as a string
value. Example: "AppViewX@123" |
| Payload | (Mandatory) Input data for request body in application/json format. For payload details, see Payload section. |
Payload
| Name | Description |
|---|---|
| skip
|
(Optional) This field in the payload is used for pagination.
Example: 0 |
| limit
|
(Optional) This field in the payload is used for pagination.
Example: 25 |
Response Structure
- Status Code: 200 OK
- Message: Successful
- Headers:
- Content-Type: application/json
| Name | Description |
|---|---|
| response | Contains the response attributes for the get policy request. |
| message | Success message or failure description in case of error. |
| appStatusCode | Application specific status code for the response. Will be non-null for failure response. |
| tags | More info in case of failure response. |
Status Codes
| HTTP Code | appStatusCode | Response Message |
|---|---|---|
| 200 OK | null | Successful |
Sample Request/Response
This API is designed to retrieve comprehensive information about a configured signing policy.
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/code-signing-get-policy?gwsource=external{
"payload": {
"skip": 0,
"limit": 25
}
}{
"response": {
"data": [
{
"policyName": "FileBasedSigning",
"fileTypes": [
"JAR",
"APK",
"PS1",
"EXE",
"CAB"
],
"restrictionType": "None",
"ip": null,
"ipRange": null,
"signingHashAlgorithm": "SHA-256",
"timeStampingAuthority": "Global Sign",
"timeStampingURL": "",
"status": "Active",
"policyKeyId": "65c49ae81112f940dab1cb31",
"policyMetaInfoId": "65c9ca7ca245650b1ecc75d9",
"permissions": [
"testsignuser:RW",
"harshithuser:R",
"super access:R",
"super access:RW"
],
"aclIdentifiers": [
"super access",
"harshithuser",
"testsignuser"
],
"signingType": "File Based Signing",
"createdDate": 1711958003401,
"keywords": [
"FileBasedSigning",
"Global Sign",
"Active"
],
"testPolicy": false,
"emailNotification": true,
"subject": "Test Email",
"toEmailList": [
"[email protected]"
],
"event": "Both",
"requiredFields": [
{
"label": "Policy Name",
"value": "policyName"
},
{
"label": "Key Name",
"value": "keyName"
},
{
"label": "IP Address",
"value": "ipAddress"
},
{
"label": "Signing Time",
"value": "signingTime"
},
{
"label": "Username",
"value": "username"
},
{
"label": "Signing Type",
"value": "signingType"
}
],
"noOfPolls": null,
"pollingInterval": null,
"_id": "65c49aee1112f940dab1cb32"
},
{
"policyName": "HashPolicy_Test",
"fileTypes": null,
"restrictionType": "None",
"ip": null,
"ipRange": null,
"signingHashAlgorithm": "SHA-256",
"timeStampingAuthority": "Entrust",
"timeStampingURL": "",
"status": "Active",
"policyKeyId": "65d45b1ca245650b1ecc7632",
"policyMetaInfoId": "66015dbdb498e701acbaf0c3",
"permissions": [
"harshithuser:R",
"super access:RW"
],
"aclIdentifiers": [
"super access",
"harshithuser"
],
"signingType": "Hash Based Signing",
"createdDate": 1712059613972,
"keywords": [
"HashPolicy_Test",
"Entrust",
"Active"
],
"testPolicy": false,
"emailNotification": false,
"subject": null,
"toEmailList": null,
"event": null,
"requiredFields": null,
"noOfPolls": 5,
"pollingInterval": 10,
"_id": "65d45b2ca245650b1ecc7633"
},
{
"policyName": "TestPolicy1",
"fileTypes": null,
"restrictionType": "None",
"ip": null,
"ipRange": null,
"signingHashAlgorithm": "SHA-256",
"timeStampingAuthority": "Symantec",
"timeStampingURL": "",
"status": "Active",
"policyKeyId": "65eeb58929b67031c341084c",
"policyMetaInfoId": "",
"permissions": [
"harshithuser:R",
"super access:RW"
],
"aclIdentifiers": [
"super access",
"harshithuser"
],
"signingType": "Hash Based Signing",
"createdDate": 1710143404600,
"keywords": [
"TestPolicy1",
"Symantec",
"Active"
],
"testPolicy": false,
"emailNotification": false,
"subject": null,
"toEmailList": null,
"event": null,
"requiredFields": null,
"noOfPolls": 5,
"pollingInterval": 10,
"_id": "65eeb7ac29b67031c341084d"
}
],
"iTotalDisplayRecords": 3,
"totalCount": 0
},
"message": null,
"appStatusCode": null,
"tags": null,
"headers": null
}What's Next
Reference
- IP/HostName/TenantName: Replace with the actual IP address, hostname,
or tenant name based on the specific configuration in AppViewX.
- IP: A unique identifier assigned to each device connected to
a computer network that uses the Internet Protocol for communication
The IP address will be included in the endpoint URL for an on-prem deployment.
- HostName: A human-readable label assigned to a device (host)
on a network
The hostname will be included in the endpoint URL for an on-prem deployment.
- TenantName: An identifier label for a tenant given to
indicate which tenant's data the API request will
access/modify
The tenant name will be included in the endpoint URL for a SaaS deployment.
- IP: A unique identifier assigned to each device connected to
a computer network that uses the Internet Protocol for communication
- GWPORT: AppViewX gateway port
A gateway port refers to a network port through which data is sent and received to communicate with a gateway in an on-prem deployment.
Example: 31443
- avxapi: Path parameter value (static) that is part of the endpoint's URL
- Endpoint: Endpoint of the API, for example: execute-hook
- gwsource: Source or origin of a gateway, for example: external.