Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Send events using REST API - Not appearing in timeline

James_Crowe
Contributor
May 22, 2023

I'm trying to use the 'Send events using REST API' feature. When I make the POST it responds with a 202 response. But I can't see it in the timeline, I assume it should available almost straightaway. 

I've double checked event sources and they seems to be setup correctly. Any ideas  really appreciated! :)

Example curl command:

(I've replaced any sensitive information). 


curl --location 'https://<mydomain>.atlassian.net/gateway/api/compass/v1/events' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic REMOVED_AUTH' \
--data '{
"cloudId": "CLOUD_ID",
"event": {
"custom": {
"displayName": "test",
"lastUpdated": "2022-05-22T12:23:45Z",
"updateSequenceNumber": 57,
"description": "testing",
"url": "https: //www.example.com",
"externalEventSourceId": "poc-event-source-custom",
"customEventProperties": {
"id": "1234",
"icon": "INFO"
}
}
}
}'

1 answer

1 accepted

1 vote
Answer accepted
James_Crowe
Contributor
May 23, 2023

Discovered this was user error. For starters the year is incorrect. Then subsequence updates did not fix the issue until I changed the sequence number. 

Phill Pafford
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 1, 2023

Hi James,

 

I have the exact same curl command, the only thing that differs is the `externalEventSourceId` but all I ever get is this response, any chance you ran into this and have a solution to solve it?

NOTE: I did follow the graphql commands and created the custom event type

 

{

"errors": [

{

"type": "CREATE_EVENT_SOURCE_NOT_FOUND",

"message": "We could not create the event because the event source is not found. Please check that the external event source ID and the type of event being submitted match the event source.If a Forge App ID was used during event source creation, please also check you are using the same Forge App ID when accessing the event source."

}

]

}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events