Uploading the code

×

Status message

New Feature: Guest Login function added to facilitate site exploration without registering. Try it out!

In our basic example, we have two files: main.py and metadata.yml, that were added to the git repository.

The next step is to commit and to push the repository to a public online git repository, for example, Github. Follow the instructions of your preferred online git provider to create a public repository and to add it as a remote to your local repository (for Github, these are the instructions).

git commit -m "First commit"
git push

After the git repository is accessible online, we can register it to Adama by posting to the /<namespace>/services endpoint:

curl -Lk -X POST \
     -F "git_repository=https://github.com/<my_github_username>/<my_repo>.git" \
     -H "Authorization: Bearer $TOKEN" \
     $ADAMA/tacc/services

If the metadata information is correct, the response should look like (edited for brevity):

{
    "message": "registration started", 
    "result": {
        ...
        "state_url": "https://api.araport.org/community/v0.3/tacc/my_adapter_v0.1",
        ...
    }, 
    "status": "success"
}

This means that the enrolling process has started. The status of the registration can be checked at the status_url link. Once it is complete we should get full stats:

{
    "result": {
        "service": {
             ... lots of statistics ...
        }
    }, 
    "status": "success"
}

At this point the adapter is ready to use. It can be seen in the full list of services for the namespace with:

curl -Lk -X GET \
     -H "Authorization: Bearer $TOKEN" \
     $ADAMA/tacc/services