Skip to content

Commit

Permalink
update nested list formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaeng72 committed Nov 27, 2024
1 parent dea54c3 commit 8a06645
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 37 deletions.
56 changes: 27 additions & 29 deletions ingest-app/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1083,16 +1083,14 @@ Tool metadata can be deleted by sending an HTTP DELETE to the URL `%CMR-ENDPOINT
{"concept-id":"TL1200000015-PROV1","revision-id":2}

## <a name="subscription"></a> Subscriptions
HIIII

A subscription allows a user to be notified when specific collections/granules are created, updated, or deleted. The collections/granules specified can be filtered by query conditions.

There are two kinds of subscriptions: Batch Notification and Near-Real-Time Notification

<ul>
<li>Batch Notification subscription notification processing is executed periodically, to see if there are any collections/granules that are created/updated since the last time the subscription has been processed and will notify the subscription user with any matches. Notification of updates is via the email address associated with the SubscriberId's EarthData Login (URS). </li>
<ul>
<li>There are two types of batch process subscriptions (identified by the `Type` field of the subscription):</li>
<li>There are two types of batch process subscriptions (identified by the "Type" field of the subscription):</li>
<ul>
<li>collection subscription for users to be notified when collections are created/updated, or </li>
<li>granule subscription for users to be notified when granules are created/update</li>
Expand All @@ -1112,14 +1110,14 @@ Subscription concepts can be created by sending an HTTP POST or PUT with the met
The response will include the [concept id](#concept-id) ,the [revision id](#revision-id), and a [native-id](#native-id).

<ul>
<li> POST or PUT may be used with the following URL: `%CMR-ENDPOINT%/subscriptions/{native-id}`</li>
<li> When using POST:
<ul>
<li>May only be used for creating subscriptions</li>
<li>Can use without a native-id at the following URL: `%CMR-ENDPOINT%/subscriptions` </li>
<li>The native-id will be auto-generated</li>
</ul>
</li>
<li> POST or PUT may be used with the following URL: %CMR-ENDPOINT%/subscriptions/{native-id}</li>
<li> When using POST:
<ul>
<li>May only be used for creating subscriptions</li>
<li>Can use without a native-id at the following URL: %CMR-ENDPOINT%/subscriptions </li>
<li>The native-id will be auto-generated</li>
</ul>
</li>
</ul>

##### Query Params for Batch Notification Subscriptions
Expand All @@ -1135,37 +1133,37 @@ If the query provided is invalid for granule searching, subscription creation wi
The metadata sent in the body of the request is in JSON format and conforms to [UMM-Sub Schema](https://git.earthdata.nasa.gov/projects/EMFD/repos/unified-metadata-model/browse/subscription). This metadata data body consists of specific fields below:

<ul>
<li>`Name`: [required] Name of subscription </li>
<li>`Type`: [required] Indicates if the subscription is a collection subscription or granule subscription.</li>
<li>Name: [required] Name of subscription </li>
<li>Type: [required] Indicates if the subscription is a collection subscription or granule subscription.</li>
<ul>
<li>Valid values: `"collection"`,`"granule"`. </li>
<li>Valid values: "collection","granule". </li>
<li>"Type": "granule": must supply a requisite CollectionConceptId field. The subscriber must have read access to the collection here, or the subscription will fail.</li>
<li>"Type": "collection": cannot have a CollectionConceptId field.</li>
</ul>
<li>`Method`: [required] designates between search (Batch Notification) subscriptions and ingest (Near-Real-Time) subscriptions</li>
<li>Method: [required] designates between search (Batch Notification) subscriptions and ingest (Near-Real-Time) subscriptions</li>
<ul>
<li>Valid values: `search` or `ingest`.</li>
<li>Default: `search`</li>
<li>Valid values: "search" or "ingest".</li>
<li>Default: "search"</li>
</ul>
<li>`SubscriberId`: [optional] If a SubscriberId is not provided, then the user ID associated with the token used to ingest the subscription will be used as the SubscriberId.</li>
<li>`EmailAddress`: [deprecated] was previously a required field, but is now deprecated. Instead, the email address associated with the SubscriberId's EarthData Login (URS) account will be used as the EmailAddress. If an EmailAddress is specified at subscription creation it will be ignored.</li>
<li>`MetadataSpecification`: [required] Specifies which metadata version schema you are using for this subscription. Currently, that version is 1.1.1.</li>
<li>SubscriberId: [optional] If a SubscriberId is not provided, then the user ID associated with the token used to ingest the subscription will be used as the SubscriberId.</li>
<li>EmailAddress: [deprecated] was previously a required field, but is now deprecated. Instead, the email address associated with the SubscriberId's EarthData Login (URS) account will be used as the EmailAddress. If an EmailAddress is specified at subscription creation it will be ignored.</li>
<li>MetadataSpecification: [required] Specifies which metadata version schema you are using for this subscription. Currently, that version is 1.1.1.</li>
</ul>

##### Additional Data Fields for Near-Real-Time Notification Subscriptions
For NRT Notification subscriptions to be used there are three new fields that are required in addition to the other fields already described.
<ul>
<li>`Type`: [required] Must be set to `granule` because NRT Notification subscriptions are only for granules.</li>
<li>`CollectionConceptId`: [required] Because type must be `granule`, we must set `CollectionConceptId` as well, as indicated in Data Fields section</li>
<li>`EndPoint`: [required] describes where notifications get sent. At this time only AWS SQS ARN's are allowed. NRT Notification subscriptions that do not use an AWS SQS ARN will fail. If Batch Notification subscriptions are desired, do not use this field.</li>
<li>`Mode`: [required] describes whether the notification is for New (ingested for the first time into the CMR) granules, Updated granules, or Deleted granules. </li>
<li>Type: [required] Must be set to "granule" because NRT Notification subscriptions are only for granules.</li>
<li>CollectionConceptId: [required] Because type must be "granule", we must set "CollectionConceptId" as well, as indicated in Data Fields section</li>
<li>EndPoint: [required] describes where notifications get sent. At this time only AWS SQS ARN's are allowed. NRT Notification subscriptions that do not use an AWS SQS ARN will fail. If Batch Notification subscriptions are desired, do not use this field.</li>
<li>Mode: [required] describes whether the notification is for New (ingested for the first time into the CMR) granules, Updated granules, or Deleted granules. </li>
<ul>
<li>Valid values: `New`, `Update`, `Delete`. Any combination of these values are valid and they are set using a json array. </li>
<li>Valid values: "New", "Update", "Delete". Any combination of these values are valid and they are set using a json array. </li>
<li> Examples: </li>
[`New`] or
[`New`, `Update`] or
[`Update`, `Delete`] or
[`Update`]
["New"] or
["New", "Update"] or
["Update", "Delete"] or
["Update"]
</ul>
</ul>

Expand Down
19 changes: 11 additions & 8 deletions search-app/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5126,14 +5126,17 @@ A subscription allows a user to be notified when specific collections/granules a

There are two kinds of subscriptions: Batch Notification and Near-Real-Time Notification

- Batch Notification subscription notification processing is executed periodically, to see if there are any collections/granules that are created/updated since the last time the subscription has been processed and will notify the subscription user with any matches. Notification of updates is via the email address associated with the SubscriberId's EarthData Login (URS).
There are two types of batch process subscriptions (identified by the `Type` field of the subscription):

- collection subscription for users to be notified when collections are created/updated, or
- granule subscription for users to be notified when granules are created/update


- Near-Real-Time (NRT) Notification subscriptions are processed on ingest and are only for granules. When a user subscribes, notifications are sent out via the provided notification endpoint, such as an AWS SQS messaging queue.
<ul>
<li>Batch Notification subscription notification processing is executed periodically, to see if there are any collections/granules that are created/updated since the last time the subscription has been processed and will notify the subscription user with any matches. Notification of updates is via the email address associated with the SubscriberId's EarthData Login (URS). </li>
<ul>
<li>There are two types of batch process subscriptions (identified by the "Type" field of the subscription):</li>
<ul>
<li>collection subscription for users to be notified when collections are created/updated, or </li>
<li>granule subscription for users to be notified when granules are created/update</li>
</ul>
</ul>
<li>Near-Real-Time (NRT) Notification subscriptions are processed on ingest and are only for granules. When a user subscribes, notifications are sent out via the provided notification endpoint, such as an AWS SQS messaging queue.
</ul>

#### <a name="searching-for-subscriptions"></a> Searching for Subscriptions

Expand Down

0 comments on commit 8a06645

Please sign in to comment.