GET /2/compliance/jobs/:id

GET /2/compliance/jobs/:id

Get a single compliance job with the specified ID.

Endpoint URL

https://api.x.com/2/compliance/jobs/:id

Authentication and rate limits

Authentication methods
supported by this endpoint

OAuth 2.0 App-only

Rate limit

App rate limit (Application-only): 150 requests per 15-minute window shared among all users of your app

Path parameters

NameTypeDescription
id
 Required 
numberThe unique identifier for the compliance job you want to retrieve.


Example code with offical SDKs

TypeScript
Java
      (async () => {
  try {
    const getComplianceJob =
      await twitterClient.compliance.getBatchComplianceJob(
        //ID of the compliance job to retrieve
        1382081613278814209
      );
    console.dir(getComplianceJob, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

    
      // Set the params values

// String | ID of the compliance job to retrieve.
String id = "1382081613278814209";

try {
    SingleComplianceJobResponse result = apiInstance.compliance().getBatchComplianceJob(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ComplianceApi#getBatchComplianceJob");
    System.err.println("Status code: " + e.getCode());
    System.err.println("Reason: " + e.getResponseBody());
    System.err.println("Response headers: " + e.getResponseHeaders());
    e.printStackTrace();
}

    

Example responses

Successful response
      {
  "data": {
    "download_expires_at": "2021-08-12T01:35:11.000Z",
    "download_url": "https://storage.googleapis.com/twttr-tweet-compliance/1423095206576984067/delivery/1202726487847104512_1423095206576984067?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=complianceapi-public-svc-acct%40twttr-compliance-public-prod.iam.gserviceaccount.com%2F20210805%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20210805T013511Z&X-Goog-Expires=604800&X-Goog-SignedHeaders=host&X-Goog-Signature=09de4feae68a6d4449eb7ce1f8f3551996552e7fba103005b3bd50ab318bb5215e4f5396ef29d17755deb6bf172b9d1dab61a04b249d39e87f6e2dbb31632b7e5f2d35f4f534e1f1522c9d7958b8745dd62471deb8d6992c80fd418628404f5f14eda3f557adf709403058910ea009e0c88ce81458ec9b915016a5c5901e2365b130db00b18fcb7da1b082e1a5c75f7bf7eeab8783675d1b6a56441ac6e9ffc972b1278a5853d2b94dda55e1a6e2068bc0ddd3cddc9213ec9cebb7cb5be931977bb28dda12c7c5e69d1f876b243f0f224076bf1b81149603319a2fc9cb82337bdbe05e7bbf184bcbdc17d43b3f5efbae72ea386d955ca10e702e00df31aabf32",
    "resumable": false,
    "upload_expires_at": "2021-08-05T01:50:11.000Z",
    "created_at": "2021-08-05T01:35:11.000Z",
    "upload_url": "https://storage.googleapis.com/twttr-tweet-compliance/1423095206576984067/submission/1202726487847104512_1423095206576984067?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=complianceapi-public-svc-acct%40twttr-compliance-public-prod.iam.gserviceaccount.com%2F20210805%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20210805T013511Z&X-Goog-Expires=900&X-Goog-SignedHeaders=content-type%3Bhost&X-Goog-Signature=ba08f588bea3873aa0465cf22015e583c2851a5ff14891d22430b1127288728f1aa303673e6895694e7017739871ff5ae59bbcde7d4ac7a14aaaafba98ad22ca818e99fb3ec7eaaf74b3ecfecbfb33711869b2e85d7666609276666ef4a8b396ae9616743a0cbd773962e5850f2942cd76be7373d608a140e041ca8492017d43fac9220fa145d0b2ecaf9f752d71fc8c4b81b67c5c22aa59ac87666f7d83714fdace72894d2911a3e36dd42028d0222e71054d6b28c8ef63d0f0000f228c8680bab9c8011b87d1a6c9a60e8cc9e8b6a83abf7c47a57772746c83b19849f5b4c938ccd0922990da5f2a81ff806edcb4667bb402fb1f1f6f5162768e0661648b21",
    "id": "1423095206576984067",
    "type": "tweets",
    "status": "expired"
  }
}
    

Response fields

NameTypeDescription
idstringThe unique identifier for this job.
created_atdate (ISO 8601)The date and time when the job was created.
typeenum (tweets, users)The type of the job, whether tweets or users.
namestringThe user defined job name. Only returned if specified when the job was created.
upload_urlstringA URL representing the location where to upload IDs consumed by your app. This URL is already signed with an authentication key, so you will not need to pass any additional credentials or headers to authenticate the request.
upload_expires_atdate (ISO 8601)The date and time until which the upload URL will be available (usually 15 minutes from the request time).
download_urlstringThe predefined location where to download the results from the compliance job. This URL is already signed with an authentication key, so you will not need to pass any additional credential or header to authenticate the request.
download_expires_atdate (ISO 8601)The date and time until which the download URL will be available (usually 7 days from the request time).
errorstringOnly returned when jobs.status is failed. Specifies the reason why the job did not complete successfully.