My Resources
    • PDF

    My Resources

    • PDF

    Article summary

    1. Get All User Accessible Resources

    This GET method is used to retrieve all the resources that a user has access to. 

    GET{{url}}/api/resource-manager/my-resources

    Request Parameters

    The request parameters used in this method are shown in the following table:

    ParameterDescriptionData TypeRequired
    filterFilter resources by key. For example, filter=key eq envStringOptional
    searchTextFilter resources by searching text.StringOptional
    typeFilter resources by type of resource. For example, type=frequentlyUsedStringOptional
    pageSpecifies the page number of the permission records to retrieveIntegerOptional
    sizeSpecifies the number of permission records to retrieve per pageIntegerOptional
    sortSpecifies the sort parameter and directionStringOptional

    Request Example

    curl --location --request GET '{{url}}/api/resource-manager/my-resources' \
    --header 'Authorization: TOKEN {{apiToken}}'

    Response Example 

    Status: 200 OK
    {
        "count": 9,
        "page": 0,
        "size": 50,
        "sort": null,
        "data": [
            {
                "transactionId": null,
                "favoriteId": null,
                "resourceId": "4kom0vx9wnqhhf7dk8nn",
                "resourceName": "convert-me",
                "resourceDescription": null,
                "profileId": "3mooyfl520x0y23a5vla",
                "profileName": "conversion-file",
                "profileDescription": "",
                "resourceTypeName": "ssh-as",
                "resourceLabels": {
                    "Resource-Type": [
                        "ssh-as"
                    ]
                },
                "status": "available",
                "expirationDuration": null,
                "checkedOutTime": null,
                "checkedInTime": null,
                "approvalValidityTime": null,
                "consoleAccess": false,
                "progAccess": false,
                "showOrigCreds": false,
                "responseTemplates": [
                    "p-template-1",
                    "p-template-2"
                ]
            },
            {
                "transactionId": null,
                "favoriteId": null,
                "resourceId": "4kom0vx9wnqhhf7dk8nn",
                "resourceName": "convert-me",
                "resourceDescription": null,
                "profileId": "5qk7fvcbbquj9o64qudw",
                "profileName": "asp1",
                "profileDescription": "",
                "resourceTypeName": "ssh-as",
                "resourceLabels": {
                    "Resource-Type": [
                        "ssh-as"
                    ]
                },
                "status": "available",
                "expirationDuration": null,
                "checkedOutTime": null,
                "checkedInTime": null,
                "approvalValidityTime": null,
                "consoleAccess": false,
                "progAccess": false,
                "showOrigCreds": false,
                "responseTemplates": [
                    "pemtoppk2",
                    "pemtoppk3"
                ]
            },
            {
                "transactionId": null,
                "favoriteId": null,
                "resourceId": "4kom0vx9wnqhhf7dk8nn",
                "resourceName": "convert-me",
                "resourceDescription": null,
                "profileId": "olqxjy5nh1pxikhmkwb1",
                "profileName": "asppktpPem",
                "profileDescription": "",
                "resourceTypeName": "ssh-as",
                "resourceLabels": {
                    "Resource-Type": [
                        "ssh-as"
                    ]
                },
                "status": "available",
                "expirationDuration": null,
                "checkedOutTime": null,
                "checkedInTime": null,
                "approvalValidityTime": null,
                "consoleAccess": false,
                "progAccess": false,
                "showOrigCreds": false,
                "responseTemplates": [
                    "testppkToPem"
                ]
            },
            {
                "transactionId": null,
                "favoriteId": null,
                "resourceId": "s9uful25tdi1eejh1qch",
                "resourceName": "asr1",
                "resourceDescription": null,
                "profileId": "3mooyfl520x0y23a5vla",
                "profileName": "conversion-file",
                "profileDescription": "",
                "resourceTypeName": "ssh-as",
                "resourceLabels": {
                    "Resource-Type": [
                        "ssh-as"
                    ]
                },
                "status": "available",
                "expirationDuration": null,
                "checkedOutTime": null,
                "checkedInTime": null,
                "approvalValidityTime": null,
                "consoleAccess": false,
                "progAccess": false,
                "showOrigCreds": false,
                "responseTemplates": [
                    "p-template-1",
                    "p-template-2"
                ]
            }      
        ]
    }

    2. Add Favorite Resources

    This POST method is used to add a particular resource to favorite resources.

    POST{{url}}/api/resource-manager/my-resources/favorites

    Request Example

    curl --location --request POST '{{url}}
    /api/resource-manager/my-resources/favorites' \
    --header 'Authorization: TOKEN {{apiToken}}'
    {
      "resourceId": "string",
      "profileId": "string"
    }

    Response Example 

    Status: 200 OK
    {
      "transactionId": "string",
      "favoriteId": "12345",
      "resourceId": "12345",
      "resourceName": "linux-server",
      "profileId": "asdckl4347mcc",
      "profileName": "linux-server-admin",
      "resourceLabels": {
        "additionalProp1": [
          "string"
        ],
        "additionalProp2": [
          "string"
        ],
        "additionalProp3": [
          "string"
        ]
      },
      "status": "string",
      "expirationDuration": "string",
      "checkedOutTime": "string",
      "checkedInTime": "string",
      "approvalValidityTime": "string"
    }

    3. Delete a Favorite Resource

    This DELETE method deletes a resource from the favorite resources list.

    DELETE{{url}}/api/resource-manager/my-resources/favorites/{favoriteId}

    Request Parameters

    The request parameters used in this method are shown in the following table:

    ParameterDescriptionData TypeRequired
    favoriteIdResource ID.StringMandatory

    Request Example

    curl --location --request DELETE '{{url}}
    /api/resource-manager/my-resources/favorites/{favoriteId}' \
    --header 'Authorization: TOKEN {{apiToken}}'

    Response Example 

    Status: 204 No Content

    4. Get Resource Approval Details

    This GET method retrieves the approval details for a resource.

    GET{{url}}/api/resource-manager/my-resources/profiles/{profileId}/resources/{resourceId}/getApprovers

    Request Parameters

    The request parameters used in this method are shown in the following table:

    ParameterDescriptionData TypeRequired
    profileIdProfile ID.StringMandatory
    resourceIdResource ID.StringMandatory

    Request Example

    curl --location --request GET '{{url}}
    /api/resource-manager/my-resources/profiles/{profileId}/resources/{resourceId}/getApprovers' \
    --header 'Authorization: TOKEN {{apiToken}}'
    {
      "resourceId": "string",
      "profileId": "string"
    }

    Response Example

    Status: 200 Ok
    {
      "additionalProp1": [
        "string"
      ],
      "additionalProp2": [
        "string"
      ],
      "additionalProp3": [
        "string"
      ]
    }



    Was this article helpful?