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": 0,
      "page": 0,
      "size": 0,
      "sort": "string",
      "data": [
        {
          "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"
        }
      ]
    }

    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?