# Search Request

## Search Request

> Use the following parameters to search requests.

````json
{"openapi":"3.0.2","info":{"title":"Vault API","version":"1.36.3"},"tags":[{"description":"A Request represents the intent of creating or changing an object in the system.\n\nFor example, when you create a transaction, a *Create transaction* request is created.\n\nYou can observe all the changes in the system via `GET /requests`.\nEvery request has a `target_type` and `target_id` that you can use to fetch\nthe object targeted by this request.\n\nFor example, you can list all requests waiting for approval:\n```\nGET /requests?status=PENDING_APPROVAL\n{\n  \"edges\": [\n    {\n      \"cursor\": 0,\n      \"node\": {\n        \"created_by\": 5,\n        \"created_on\": \"2020-09-25T13:52:38.377654+00:00\",\n        \"expires_at\": \"2020-10-02T13:52:38.377605+00:00\",\n        \"id\": 20,\n        \"status\": \"PENDING_APPROVAL\",\n        \"target_id\": 13,\n        \"target_type\": \"USER\",\n        \"type\": \"REVOKE_USER\"\n      }\n    },\n    {\n      \"cursor\": 1,\n      \"node\": {\n        \"created_by\": 11,\n        \"created_on\": \"2020-09-25T13:52:53.421567+00:00\",\n        \"expires_at\": \"2020-10-02T13:52:53.421502+00:00\",\n        \"id\": 21,\n        \"status\": \"PENDING_APPROVAL\",\n        \"target_id\": 3681,\n        \"target_type\": \"TRANSACTION\",\n        \"type\": \"CREATE_TRANSACTION\"\n      }\n    }\n  ],\n  \"page_info\": {\n    \"count\": 2,\n    \"has_next_page\": false\n  }\n}\n```\nHere we have 2 requests waiting for approval. You can have more info on\nthose 2 objects via\n```\nGET /users/13\nGET /transactions/3681\n```","name":"Requests"}],"security":[{"Ledger_API_Key":[],"Ledger_API_User":[]},{"Ledger_API_Key":[],"Ledger_API_User":[],"Ledger_Store_Auth_Token":[]},{"Ledger_API_User":[]},{"Ledger_API_User":[],"Ledger_Store_Auth_Token":[]}],"components":{"securitySchemes":{"Ledger_API_Key":{"description":"If you've set up your API Key when initializing your LAM, you'll need to include it as a header along with the api user header. For more details, [see step 5 of the get started documentation](https://help.vault.ledger.com/Content/api/api_getstarted.html).","in":"header","name":"X-Ledger-API-Key","type":"apiKey"},"Ledger_API_User":{"description":"(**required**) Username of a registered API User","in":"header","name":"X-Ledger-API-User","type":"apiKey"}},"schemas":{"_APISearchRequestResults":{"properties":{"edges":{"items":{"$ref":"#/components/schemas/RequestSearchResult"},"type":"array"},"page_info":{"$ref":"#/components/schemas/APISearchPageInfo"}},"required":["edges","page_info"],"type":"object"},"RequestSearchResult":{"properties":{"cursor":{"type":"integer"},"node":{"$ref":"#/components/schemas/Request"}},"required":["cursor","node"],"type":"object"},"Request":{"additionalProperties":false,"properties":{"created_by":{"default":null,"nullable":true,"type":"integer"},"created_on":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"status":{"enum":["ACTIVE","APPROVED","BLOCKED","EXPIRED","PENDING_APPROVAL","PENDING_FIRST_APPROVAL","PENDING_REGISTRATION","REJECTED","SIGNED","SUBMITTED"],"type":"string"},"target_id":{"type":"integer"},"target_type":{"enum":["ACCOUNT","ADMIN_GROUP","DIGESTS","ENTITY","FORCED_UNPLEDGE","GROUP","MESSAGE","PLEDGE_INCREMENT","POLICY","REPLEDGE","TRADELINK","TRADELINK_ASSET_MANAGER","TRADELINK_EXCHANGE","TRANSACTION","USER","WHITELIST"],"type":"string"},"type":{"enum":["ACTIVATE","CREATE_ACCOUNT","CREATE_ADMIN","CREATE_ADMIN_GROUP","CREATE_API_USER","CREATE_API_USER_ACCESS","CREATE_DAPPS_CONFIG","CREATE_ENTITY","CREATE_FORCED_UNPLEDGE","CREATE_GROUP","CREATE_OPERATOR","CREATE_PLEDGE_INCREMENT","CREATE_POLICY","CREATE_REPLEDGE","CREATE_TRADELINK","CREATE_TRADELINK_ASSET_MANAGER","CREATE_TRADELINK_EXCHANGE","CREATE_TRANSACTION","CREATE_WHITELIST","EDIT_ACCOUNT","EDIT_ADMIN_GROUP","EDIT_DAPPS_CONFIG","EDIT_ENTITY","EDIT_GROUP","EDIT_POLICY","EDIT_TRADELINK","EDIT_TRADELINK_ASSET_MANAGER","EDIT_TRADELINK_EXCHANGE","EDIT_WHITELIST","MESSAGE_SIGNING","MIGRATE_ACCOUNT","MIGRATE_ADMIN","MIGRATE_GROUP","MIGRATE_OPERATOR","MIGRATE_WHITELIST","REVOKE_ENTITY","REVOKE_GROUP","REVOKE_USER","SIGN_DIGESTS","UPDATE_QUORUM"],"type":"string"},"used_admin_group":{"default":null,"description":"Admin Group used to create and approve the request","nullable":true,"type":"integer"}},"required":["created_on","expires_at","id","status","target_id","target_type","type"],"type":"object"},"APISearchPageInfo":{"properties":{"count":{"type":"integer"},"has_next_page":{"type":"boolean"}},"required":["count","has_next_page"],"type":"object"},"Error":{"properties":{"message":{"type":"string"},"name":{"type":"string"},"status_code":{"type":"integer"}},"required":["message","name","status_code"],"type":"object"}}},"paths":{"/requests":{"get":{"summary":"Search Request","tags":["Requests"],"description":"Use the following parameters to search requests.","parameters":[{"name":"approved_by","in":"query","description":"Returns requests which have been approved by the specified user.","required":false,"schema":{"default":null,"nullable":true,"type":"integer"}},{"name":"created_after","in":"query","description":"Returns objects created after the entered date.","required":false,"schema":{"default":null,"format":"date-time","nullable":true,"type":"string"}},{"name":"created_before","in":"query","description":"Returns objects created before the entered date.","required":false,"schema":{"default":null,"format":"date-time","nullable":true,"type":"string"}},{"name":"created_by","in":"query","description":"Returns requests which have been created by the specified user.","required":false,"schema":{"default":null,"nullable":true,"type":"integer"}},{"name":"id","in":"query","description":"Returns the object corresponding to the entered ID","required":false,"schema":{"default":null,"nullable":true,"type":"integer"}},{"name":"order","in":"query","description":"Orders the list of results","required":false,"schema":{"default":null,"enum":[null,"asc","desc"],"nullable":true,"type":"string"}},{"name":"order_by","in":"query","description":"criteria to order by","required":false,"schema":{"default":null,"nullable":true,"type":"string"}},{"name":"page","in":"query","description":"Defines the page number to be fetched.","required":false,"schema":{"default":1,"minimum":1,"nullable":true,"type":"integer"}},{"name":"page_size","in":"query","description":"Defines the number of elements displayed on a page.\n        Must be a positive number with 0 and -1 return a maximum defined in the gate","required":false,"schema":{"default":20,"minimum":-1,"nullable":true,"type":"integer"}},{"name":"pending_by","in":"query","description":"Returns requests which are pending the specified user's approval.","required":false,"schema":{"default":null,"nullable":true,"type":"integer"}},{"name":"rejected_by","in":"query","description":"Returns requests which have been rejected by the specified user.","required":false,"schema":{"default":null,"nullable":true,"type":"integer"}},{"name":"status","in":"query","description":"Returns objects that match the selected status.","required":false,"explode":true,"schema":{"default":null,"items":{"enum":["ACTIVE","APPROVED","BLOCKED","EXPIRED","PENDING_APPROVAL","PENDING_FIRST_APPROVAL","PENDING_REGISTRATION","REJECTED","SIGNED","SUBMITTED"],"type":"string"},"nullable":true,"type":"array"},"style":"form"},{"name":"target_id","in":"query","description":"Search by ID of the target object.","required":false,"schema":{"default":null,"nullable":true,"type":"integer"}},{"name":"target_type","in":"query","description":"Search requests by object type.","required":false,"explode":true,"schema":{"default":null,"items":{"enum":["ACCOUNT","ADMIN_GROUP","DIGESTS","ENTITY","FORCED_UNPLEDGE","GROUP","MESSAGE","PLEDGE_INCREMENT","POLICY","REPLEDGE","TRADELINK","TRADELINK_ASSET_MANAGER","TRADELINK_EXCHANGE","TRANSACTION","USER","WHITELIST"],"type":"string"},"nullable":true,"type":"array"},"style":"form"},{"name":"type","in":"query","description":"Search requests by request type.","required":false,"explode":true,"schema":{"default":null,"items":{"enum":["ACTIVATE","CREATE_ACCOUNT","CREATE_ADMIN","CREATE_ADMIN_GROUP","CREATE_API_USER","CREATE_API_USER_ACCESS","CREATE_DAPPS_CONFIG","CREATE_ENTITY","CREATE_FORCED_UNPLEDGE","CREATE_GROUP","CREATE_OPERATOR","CREATE_PLEDGE_INCREMENT","CREATE_POLICY","CREATE_REPLEDGE","CREATE_TRADELINK","CREATE_TRADELINK_ASSET_MANAGER","CREATE_TRADELINK_EXCHANGE","CREATE_TRANSACTION","CREATE_WHITELIST","EDIT_ACCOUNT","EDIT_ADMIN_GROUP","EDIT_DAPPS_CONFIG","EDIT_ENTITY","EDIT_GROUP","EDIT_POLICY","EDIT_TRADELINK","EDIT_TRADELINK_ASSET_MANAGER","EDIT_TRADELINK_EXCHANGE","EDIT_WHITELIST","MESSAGE_SIGNING","MIGRATE_ACCOUNT","MIGRATE_ADMIN","MIGRATE_GROUP","MIGRATE_OPERATOR","MIGRATE_WHITELIST","REVOKE_ENTITY","REVOKE_GROUP","REVOKE_USER","SIGN_DIGESTS","UPDATE_QUORUM"],"type":"string"},"nullable":true,"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_APISearchRequestResults"}}},"description":"Request search results"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid search parameters"}}}}}}
````
