DatRep... queries allow you to access information about your reports.
If you are interested in Octopart reporting, please get in touch with our business team at: [email protected] or via our support ticketing here
Here are some example queries:
datRepOctopartReportTypes:
These return information on report:
- Family type
- Frequency of report
- URL example
- ID
- Name
- Description
query DatRepTypes { datRepOctopartReportTypes { reportFamily frequency exampleUrl id name description } }
The results of using this query:
{ "data": { "datRepOctopartReportTypes": [ { "reportFamily": "Manufacturers", "frequency": "Monthly", "exampleUrl": "https://nexar-report-examples-prod.s3.amazonaws.com/Example+Reports/Example+Dashboard.pdf", "id": "61e73...", "name": "Example Dashboard", "description": "Overview of engagement on Octopart.com - Includes monthly counts of PDP views, datasheet downloads, and offer clicks." }, { "reportFamily": "Manufacturers", "frequency": "Monthly", "exampleUrl": "https://nexar-report-examples-prod.s3.amazonaws.com/Example+reports/Example+Profile.pdf", "id": "61e7...", "name": "Example Profile", "description": "Understand which distributors and locations are driving demand for your product." } ] } }
datRepReports:
Returns information on your report
- ID
- File type
- File size
- Date of Creation
- Title
- CompanyID
query GetReports { datRepReports( companyId: "123..." first: 2 after: "MQ==" where: { title: { startsWith: "Manufacturer" } } order: { createdDate: DESC } ) { totalCount nodes { id fileType fileSize createdDate title ... on DatRepOctopartReport { companyId } } pageInfo { startCursor endCursor hasNextPage hasPreviousPage } } }
The response of this query:
{ "data": { "datRepReports": { "totalCount": 4, "nodes": [ { "id": "630b...", "fileType": "pdf", "fileSize": 162363, "createdDate": "2023-12-01T14:06:40.950Z", "title": "Example Performance Dashboard", "companyId": "123..." }, { "id": "964...", "fileType": "pdf", "fileSize": 50663, "createdDate": "2023-12-01T14:05:53.144Z", "title": "Example Manufacturer Channel Profile", "companyId": "123..." } ], "pageInfo": { "startCursor": "Mg==", "endCursor": "Mw==", "hasNextPage": false, "hasPreviousPage": true } } } }
datRepDownloadableFile:
- Download URL
- URL expiry date
- Report information
- ID
- File type
- File size
- Date created
- Title
query GetReportDownloadUrl { datRepDownloadableFile( companyId: "123... reportId: "32b4..." ) { downloadUrl urlExpiryDate report { id fileType fileSize createdDate title __typename ... on DatRepOctopartReport { companyId } } } }
The response of this query:
{ "data": { "datRepDownloadableFile": { "downloadUrl": "https://nexar-report-prod.s3.amazonaws.com/companyId%3D15344/year%3D2023/month%3D11/day%3D8/Competitive%20Market%20Demand.csv?AWSAccessKeyId=AS...&Expires=1707722314&x-amz-security-token%3D&Signature=FUq9%2BNoKZrvnyzLWu5BedOrX%2FDo%3D", "urlExpiryDate": "2024-01-01T07:18:34.179Z", "report": { "id": "32b4...", "fileType": "csv", "fileSize": 154843, "createdDate": "2023-12-01T14:01:55.926Z", "title": "Example Competitive Market Demand", "__typename": "DatRepOctopartReport", "companyId": "123..." } } } }
datRepOctopartReportRequests:
Gives you information on the the company:
- ID
- Report ID
- Report Type ID
- Report creation date
- Number of requested reports
- Number of deleted reports
query GetReportRequests { datRepOctopartReportRequests(companyId: "123...") { id companyId reportTypeId createdDate numActiveReports numDeletedReports } }
The response of this query:
{ "data": { "datRepOctopartReportRequests": [ { "id": "1126...", "companyId": "123...", "reportTypeId": "6228...", "createdDate": "2024-01-01T14:00:20.640Z", "numActiveReports": 2, "numDeletedReports": 0 }, { "id": "627d...", "companyId": "123...", "reportTypeId": "6228...", "createdDate": "2024-01-01T13:25:15.329Z", "numActiveReports": 1, "numDeletedReports": 0 } ] } }
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article