Edit in GitHubLog an issue

CJA Date Ranges

The Date Range API allows you to retrieve a list of ranges, get a single date range, update a date range, or create a date range through Adobe I/O.

Get Date Ranges#

The following GET returns dateranges the user has access to.

GET https://cja.adobe.io/dateranges

Additional details may be requested by using the query parameters below.

Query String Parameters#

Query StringTypeDescriptionPossible Values
filterByIdsStringComma separated list of date range ids. Returns only date ranges with these idsid1,id2
expansionStringAllows requests for some response fields to be populated that would otherwise not be included.ownerFullName,modified,definition,tags,shares
includeTypeStringAlters the set of date ranges that are included in API responses.all,shared,templates
limitIntegerNumber of results per page. If left null, the default size is 100.10
pageIntegerPage number. The first page is indexed at 0.0

Example : Get date ranges#

Request:

GET https://cja.adobe.io/dateranges

Response:

Copied to your clipboard
1{
2 "content": [
3 {
4 "id": "5a5e294452faff002119a986",
5 "name": "Curated Data Range Test",
6 "description": "Curated Data Range Test",
7 "owner": {
8 "id": 622291
9 },
10 "createDate": null,
11 "disabledDate": null
12 },
13 {
14 "id": "591f2edabef0d37113bbcbf5",
15 "name": "Sample Date Range (Don't delete it)",
16 "description": "Sample Date Range",
17 "owner": {
18 "id": 622291
19 },
20 "createDate": null,
21 "disabledDate": null
22 },
23 {
24 "id": "5e79255b4201ce1b3cfd7b2b",
25 "name": "Integration Test 1",
26 "description": "Integration Test 1 Description",
27 "owner": {
28 "id": 622291
29 },
30 "createDate": null,
31 "disabledDate": null
32 },
33 {
34 "id": "5e793112e58055470d34589a",
35 "name": "Integration Test 1",
36 "description": "Integration Test 1 Description",
37 "owner": {
38 "id": 622291
39 },
40 "createDate": null,
41 "disabledDate": null
42 },
43 {
44 "id": "5e7a1334e58055470d34592f",
45 "name": "Integration Test 1",
46 "description": "Integration Test 1 Description",
47 "owner": {
48 "id": 622291
49 },
50 "createDate": null,
51 "disabledDate": null
52 },
53 {
54 "id": "5e8b80ca1d77104488659d9a",
55 "name": "Integration Test 1",
56 "description": "Integration Test 1 Description",
57 "owner": {
58 "id": 622291
59 },
60 "createDate": null,
61 "disabledDate": null
62 },
63 {
64 "id": "5e8b80d7c50fbf606ac3843b",
65 "name": "Integration Test 1",
66 "description": "Integration Test 1 Description",
67 "owner": {
68 "id": 622291
69 },
70 "createDate": null,
71 "disabledDate": null
72 },
73 {
74 "id": "5e8b80df7f17335cfa66680a",
75 "name": "Integration Test 1",
76 "description": "Integration Test 1 Description",
77 "owner": {
78 "id": 622291
79 },
80 "createDate": null,
81 "disabledDate": null
82 },
83 {
84 "id": "5e8b80e90d087502cdf43b67",
85 "name": "Integration Test 1",
86 "description": "Integration Test 1 Description",
87 "owner": {
88 "id": 622291
89 },
90 "createDate": null,
91 "disabledDate": null
92 },
93 {
94 "id": "5e8b80f18191bc0e83c22b1a",
95 "name": "Integration Test 1",
96 "description": "Integration Test 1 Description",
97 "owner": {
98 "id": 622291
99 },
100 "createDate": null,
101 "disabledDate": null
102 }
103 ],
104 "totalElements": 34,
105 "totalPages": 4,
106 "numberOfElements": 10,
107 "number": 0,
108 "firstPage": true,
109 "lastPage": false,
110 "sort": null,
111 "size": 10
112}

Retrieving a single Date Range#

To retrieve a single date range, include its id in the request.

Example request#

GET https://cja.adobe.io/dateranges/5a5e294452faff002119a986

Example response#

Copied to your clipboard
1{
2 "id": "5a5e294452faff002119a986",
3 "name": "Curated Data Range Test",
4 "description": "Curated Data Range Test",
5 "owner": {
6 "id": 622291
7 },
8 "definition": "tm/tm+1m",
9 "createDate": null,
10 "disabledDate": null
11}

Deleting a Date Range#

The DELETE single date range can be used to remove a date range that is no longer needed.

Example DELETE request#

The request is the same as retrieving a single date range except to change the HTTP method to DELETE.

DELETE https://cja.adobe.io/dateranges/5a5e294452faff002119a986

Updating or Changing a Date Range#

Existing date ranges can be edited via the PUT /dateranges/[date range id] endpoint. Most date range fields can be updated, not including those that are derived or provided by the API.

The PUT endpoint also supports partial updates. This means that instead of sending the entire JSON object to the API, the request may include only the fields that need to be updated.

Example PUT request#

The following example shows JSON fields to be updated with a PUT request:

PUT https://cja.adobe.io/dateranges/5a5e294452faff002119a986

with payload

Copied to your clipboard
1{
2 "name": "new name",
3 "description": "new description",
4 "definition": "tm/tm+1m"
5}

Creating a Date Range#

Date Range names are allowed to include utf-8 character combinations that are not empty strings or null. However, if the name is too long, it does not display properly in the UI, so provide only useful and understandable names to improve readability.

To create a date range with the CJA APIs:

  1. Define/Specify/Configure/Build a definition.
  2. Specify a name. The name should be descriptive of what the date range does. The description field can provide additional context about the date range.
  3. POST to the /dateranges endpoint.
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.