Request
List requests
Get a list of requests from company admins. If logged in with a company account, the API will return the requests from that account only.
const response = await geocore.Request.find({
type: "Export company data" | "Delete company data",
description: "description",
status: "Pending" | "Approved" | "Rejected",
requesters: ["requesterId"],
requesterGroups: ["requesterCompanyId"],
requesterName: "Requester Name",
requesterGroupName: "Requester Company Name",
createdRange: {
start: "2025-01-01",
end: "2025-01-01",
}
updatedRange: {
start: "2025-01-01",
end: "2025-01-01",
}
page: 1,
limit: 10,
});
Prerequisites
Successfully get the IdToken with companyAdmin or superAdmin from login API.
Parameters
name type data type description type optional string Search by request type, accept values: Export company data,Delete company datadescription optional string Search by request description status optional string Search by request status, accept values: Pending,Approved,Rejectedrequesters optional array<string> Search by requester ID requesterGroups optional array<string> Search by requester company ID requesterName optional string Search by requester name requesterGroupName optional string Search by requester company name createdRange[start] optional date Search by createdAttimestampcreatedRange[end] optional date Search by createdAttimestampupdatedRange[start] optional date Search by modifiedAttimestampupdatedRange[end] optional date Search by modifiedAttimestamppage optional number Page ordinal number limit optional number Number of records per page
Create request
Company admins create a new request.
const response = await geocore.Request.create({
type: "Export company data" | "Delete company data",
description: "description",
});
Prerequisites
Successfully get the IdToken with companyAdmin access level from login API.
Parameters
name type data type description type required string Request type, accept values: Export company data,Delete company datadescription optional string Request description
Update request
Update a company admin request. Company admins can not update the request when its status is Approved or Rejected, also can not update the request status or exportDestinationBucket.
const response = await geocore.Request.update(
requestId,
{
type: "Export company data" | "Delete company data",
description: "description",
status: "Pending" | "Approved" | "Rejected",
exportDestinationBucket: "bucket-name"
}
);
Prerequisites
Successfully get the IdToken with companyAdmin or superAdmin access level from login API.
Parameters
name type data type description requestId required string Request ID type required string Request type, accept values: Export company data,Delete company datadescription optional string Request description status required string Request status, accept values: Pending,Approved,RejectedexportDestinationBucket optional string Destination S3 bucket to export company data to