Skip to content

Reporting API (1)

This API provides services to generate reports and media files.

Languages
Servers
Mock server

https://idp.cdq.com/_mock/apis/reporting-api/api-v1/

Production SOAP

https://reporting-api.reverse-proxy.prod.k8s.production.cdq-cloud-engine.com/soap/v1/

Production

https://reporting-api.reverse-proxy.prod.k8s.production.cdq-cloud-engine.com/

Business Partners

Gather endpoints related to operations on Business Partners. These operations include getting a list of Business Partners, which can be filtered and paged by optional query parameters.

Files

Gather endpoints related to operations on files. These operations include uploading, downloading, and deleting files.

Operations

Request File Upload

Request

Create a file in the file storage using the url provided.

Headers
X-Credential-Usernamestringrequired

Username that is passed as header parameter with the name X-Credential-Username. The header can take a form of:

  • username (e.g. "JohnDoe")
  • user id (e.g. "87b1bdb1-ba87-4522-b363-c5a0e6e917b3")
Example: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3
Bodyapplication/jsonrequired
urlstringrequired

Name of file or path to file.

Example: "dq-chart.png or requestedDirectory/dq-chart.png"
directorystring(Directory)required

Directory where the file is stored.

Enum ValueDescription
CUSTOMER_UPLOADS

Customer uploads

FRAUD_ATTACHMENTS

Fraud attachments

VALIDATION_REPORT

Validation report

R_SCRIPT_OUTPUT_FILES

R script output files

BAR_CHARTS

Bar charts

MATCHING_RESULTS

Matching results

OVERLAP_REPORT

Overlap report

CONFLATION

Conflation

CURATION_REPORT

Curation report

DATA_DUMP_REPORT

Data dump report

Example: "CUSTOMER_UPLOADS"
organizationstring

To be deprecated once JWT token is provided.

Example: "cdq"
featuresOnArray of strings(FileUploadFeatureParam)

List of features to be enabled.

Items Value"LAB_USE_MAX_FILE_SIZE"
Example: ["LAB_USE_MAX_FILE_SIZE"]
curl -i -X POST \
  https://idp.cdq.com/_mock/apis/reporting-api/api-v1/files \
  -H 'Content-Type: application/json' \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
  -d '{
    "url": "dq-chart.png or requestedDirectory/dq-chart.png",
    "directory": "CUSTOMER_UPLOADS",
    "organization": "cdq",
    "featuresOn": [
      "LAB_USE_MAX_FILE_SIZE"
    ]
  }'

Responses

OK

Bodyapplication/json
uploadLinkstring

Presigned URL generated by S3. The file should be uploaded on this URL with a defined HTTP method.

Example: "https://cdl-testbucket.s3.eu-central-1.amazonaws.com/temporary-files/cdlbot/myDirectory/report.xls?x-amz-meta-created_at=2019"
uploadMethodstring

Method of uploading file.

Example: "PUT"
expiresAtstring

How long this link will be active.

Example: "ISO date format, when a link expires"
urlstring

Url to file.

Example: "temporary-files/johndoe/dq-chart.png"
Response
application/json
{ "uploadLink": "https://cdl-testbucket.s3.eu-central-1.amazonaws.com/temporary-files/cdlbot/myDirectory/report.xls?x-amz-meta-created_at=2019", "uploadMethod": "PUT", "expiresAt": "ISO date format, when a link expires", "url": "temporary-files/johndoe/dq-chart.png" }

Delete Files

Request

Delete a file for given paths.

Query
urlArray of stringsnon-emptyrequired

Path of file which should be deleted.

Example: url=customer-upload/file.xlsx
Headers
X-Credential-Usernamestringrequired

Username that is passed as header parameter with the name X-Credential-Username. The header can take a form of:

  • username (e.g. "JohnDoe")
  • user id (e.g. "87b1bdb1-ba87-4522-b363-c5a0e6e917b3")
Example: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3
curl -i -X DELETE \
  'https://idp.cdq.com/_mock/apis/reporting-api/api-v1/files?url=customer-upload%2Ffile.xlsx' \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'

Responses

OK

Bodyapplication/json
resultsArray of objects(FileDeleteResult)

List of results for each file deletion.

Response
application/json
{ "results": [ {} ] }

List Resources

Request

Returns list of all resources, which are available at the specific url path.

Query
urlstringrequired

Name of file or path to file.

Example: url=dq-chart.png or requestedDirectory/dq-chart.png
startAfterstring

Continuation token. Encoded s3 path from which listing resources should be started.

Example: startAfter=1XUzntG%2FKE%2B5IN08GrJQgKin9OblLzlorehkIs1xlj46yyCktx%2FsZrQeTh2FvBKOLLB%2Fu%2F32Ow%2BRJfLUjMqi6gGGjsAQRPZ4u
limitinteger(int32)>= 1

Allowed maximum elements.

Default 300
Example: limit=300
directorystring(Directory)required

Directory where the file is stored.

Enum ValueDescription
CUSTOMER_UPLOADS

Customer uploads

FRAUD_ATTACHMENTS

Fraud attachments

VALIDATION_REPORT

Validation report

R_SCRIPT_OUTPUT_FILES

R script output files

BAR_CHARTS

Bar charts

MATCHING_RESULTS

Matching results

OVERLAP_REPORT

Overlap report

CONFLATION

Conflation

CURATION_REPORT

Curation report

DATA_DUMP_REPORT

Data dump report

Example: directory=CUSTOMER_UPLOADS
Headers
X-Credential-Usernamestringrequired

Username that is passed as header parameter with the name X-Credential-Username. The header can take a form of:

  • username (e.g. "JohnDoe")
  • user id (e.g. "87b1bdb1-ba87-4522-b363-c5a0e6e917b3")
Example: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3
curl -i -X GET \
  'https://idp.cdq.com/_mock/apis/reporting-api/api-v1/files/resources?url=dq-chart.png+or+requestedDirectory%2Fdq-chart.png&directory=CUSTOMER_UPLOADS' \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'

Responses

OK

Bodyapplication/json
startAfterstring

Value of continuation token from the request.

Example: "5712566172571652"
limitinteger(int32)

Maximum number of elements.

Example: "300"
nextStartAfterstring

Value of continuation token required to retrieve results from the next page. Should be passed in the next request as "startAfter" parameter.

Example: "5712566172571652"
filesArray of objects(FileResource)

List of files.

Response
application/json
{ "startAfter": "5712566172571652", "limit": "300", "nextStartAfter": "5712566172571652", "files": [ {} ] }

Request File Download

Request

Download file from CDQ Cloud.

Headers
X-Credential-Usernamestringrequired

Username that is passed as header parameter with the name X-Credential-Username. The header can take a form of:

  • username (e.g. "JohnDoe")
  • user id (e.g. "87b1bdb1-ba87-4522-b363-c5a0e6e917b3")
Example: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3
Bodyapplication/jsonrequired
urlstringrequired

ID of the file.

Example: "customer-upload/user/file.xlsx"
downloadLinkAgeinteger(int64)

Set expiry Time (in millis) for a download link. When the value is set to 0, then a generated link has max expiration time. Max expiration time for a link is 7 days. Minimum expiration time is 1 second.

Default 0
Example: "604800000"
curl -i -X POST \
  https://idp.cdq.com/_mock/apis/reporting-api/api-v1/files/download \
  -H 'Content-Type: application/json' \
  -H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
  -d '{
    "url": "customer-upload/user/file.xlsx",
    "downloadLinkAge": "604800000"
  }'

Responses

OK

Bodyapplication/json
urlstring

Url of file stored on S3 storage.

Example: "/customer-upload/file.xlsx"
createdBystring(UserId)

Unique ID of a user.

Example: "johndoe"
createdAtstring(CreatedAt)

Date of creation (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
modifiedAtstring(ModifiedAt)

Date of modification (ISO 8601-compliant).

Example: "2020-08-31T16:47+00:00"
expiresAtstring

How long this link will be active.

Example: "2022-01-01T00:00:00Z"
downloadLinkstring

Url to download file.

Example: "https://cdl-testbucket.s3.eu-central-1.amazonaws.com/temporary-files/cdlbot/myDirectory/report.xls?x-amz-meta-created_at=2019"
downloadMethodstring

Method of downloading file.

Example: "GET"
Response
application/json
{ "url": "/customer-upload/file.xlsx", "createdBy": "johndoe", "createdAt": "2020-08-31T16:47+00:00", "modifiedAt": "2020-08-31T16:47+00:00", "expiresAt": "2022-01-01T00:00:00Z", "downloadLink": "https://cdl-testbucket.s3.eu-central-1.amazonaws.com/temporary-files/cdlbot/myDirectory/report.xls?x-amz-meta-created_at=2019", "downloadMethod": "GET" }

Reports

Gather endpoints related to operations on reports. These operations include generating reports, which can be filtered and paged by optional query parameters.

Media

Gather endpoints related to operations on media files. These operations include getting a list of media files, which can be filtered and paged by optional query parameters.